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
+1
#2
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
Thanks for the quick fix, esteewhy. I have tested and committed.