Problems with UTF-8 encoding

barm - October 30, 2009 - 17:44
Project:Embed widgets
Version:6.x-2.0-alpha2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:fixed
Issue tags:fix
Description

When I am creating widget from block it have wrong encoding. Souse block is in write encoding and readeable, but widget is not.

For example:
at block: финал Кубка Клуба
at widget: финал Кубка Клуба

What am I doing wrong?

#1

kvit - November 19, 2009 - 17:33

+1

AttachmentSize
wrong Cyrillic encoding.jpg 33.63 KB

#2

esteewhy - November 24, 2009 - 11:09
Issue tags:+fix

Confirm.

This problem is a side-effect of using a DomDocument API inside embed_widgets_alter_links function in embed_widgets.module:519 file.

The symptoms were passionately described, for example, there. But their solution doesn't work.

Something that works is given here.

That is, need to replace a line #519 at embed_widgets.module with something like:

$dom->loadHTML(mb_convert_encoding($string, 'HTML-ENTITIES', "UTF-8"));

No patches, sorry, but the fix is trivial.

#3

jtsnow - November 24, 2009 - 13:03
Title:Problems with Cyrillic encoding» Problems with UTF-8 encoding
Status:active» fixed

Thanks for the quick fix, esteewhy. I have tested and committed.

 
 

Drupal is a registered trademark of Dries Buytaert.