Wrong encoding of foreign language with CB message

16 years 3 months ago #55947 by alterna
I mean exactly that the messages checked in the database with PU database admin are correctly encoded with é being displayed for instance instead of [code:1]é[/code:1] but that on the frontend they are not decoded correctly and the html links provided by CB component are not properly displayed neither.

Yes I have the correct ISO8859-1 for both email and messages

Please see the attached screen copy if you want to understand the display problem

Attachment Archive-129fc96fe4df1aec8a49abae45f3d2a9.zip not found



PS:
I just noticed on the source code of the page that uddeim adds [code:1]&[/code:1] before all accented characters which explains the wrong output. Does it help ?

Post edited by: alterna, at: 2008/02/04 00:00
Attachments:

Please Log in to join the conversation.

16 years 3 months ago #55962 by slabbi
When you send a message from uddeIM user to uddeIM user the characters are NOT saved as HTML entity. When they are saved as HTML entity the text is exactly displayed as it was saved in the database. So when a component, e.g. CB, saves HTML entities like "& uuml; " they are displayed as "& uuml;" and not as "ü".

Have you changed the CB language file? Please check if these HTML entities are part of the file and replace them with the character itself.

This behavior has not been changed in uddeIM since 0.5 so I wonder why this problem appears on your system now.

Do you use plug_pms_uddeim or plug_pms_mypms? If you use "*_uddeim" what happens when you use the (patched) original one?

To make it clear: It is not a problem with uddeIM. When a component writes in uddeIMs database it has to ensure that it writes correctly into the database.

Post edited by: slabbi, at: 2008/02/04 08:41

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in to join the conversation.

16 years 3 months ago #55964 by slabbi
So I checked a the code and maybe this could be a quick fix for you:

Change line 375 in inbox.php from
[code:1]$dmessage=nl2br(htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset));

to

$dmessage=nl2br(stripslashes($cm), ENT_QUOTES, $config->charset);[/code:1]

(you will find the same line in outbox.php).

But it might be a risk not to escape html special characters like "&" to "& amp;". So be warned!

ALL OTHER WHO DO NOT HAVE THIS PROBLEM: DO NOT APPLY THIS FIX UNLESS YOU NOW WHAT YOU ARE DOING!

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in to join the conversation.

16 years 3 months ago #55969 by alterna
OK I guess that the only solution would be to change CB french language file so that it matches uddeim requirements.

I did not have this problem with plug_mypms, everything was fine.

Moreover even if I change the french language file, this will not correct the link to CB profile in the message which is saved as xxxxx and is not recognized by uddeim

Can you suggest a change to this or will uddeim automatically recognize a link if I remove the tag ?

Please Log in to join the conversation.

16 years 3 months ago #55973 by slabbi
Two questions:

Just to be sure: You are using plug_pms_uddeim and with that it is not working like before. And when you use plug_pms_mypmspro (with uddeim selected in settings) it is working fine?


"which is saved as xxxxx and is not recognized by uddeim". uddeIM does not convert links automatically to html links (clickable links). That is done by BB tags which must be enabled in backend. What is "xxxxx"? Is the correct link replaced by "xxxxx"?

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in to join the conversation.

16 years 3 months ago #55976 by alterna
what I can tell you is that all was working ok with mypmspro before installing uddeim and that since I installed uddeim I have this problem only with messages sent by CB connections module.

Everything else is working fine and your component is really great

I could work with the encoding problem by changing the french language fields in CB french module but I cannot solve the links problem.


BBcode is enabled and the links provided by CB connection module are not appearing correctly, these links are provided by CB connection module between the tags [ url ] which are not decoded properly by uddeim

I am sorry to insist but this is definitely a problem between uddeim and CB connection module

Please Log in to join the conversation.

Moderators: beatnantslabbikrileon
Time to create page: 0.469 seconds

Facebook Twitter LinkedIn