Wrong encoding of foreign language with CB message

16 years 3 months ago #56063 by alterna
OK guys thanks for the help, finally it seems that one part of the problem is solved, all encoding is ok using Beat's advice without entity encoding and ISO-8859-1

But I still get the links problem using the latest svn of pms.uddeim.php

Links are built like this:

[code:1]icontes.com/Accueil/?tab=1]Accueil[/url]%3C/span%3E%20demande%20de%20se%20mettre%20en%20relation%20avec%20vous.%20Ceci%20n%E9cessite%20votre%20approbation.%20Merci%20d'accepter%20ou%20refuser%20la%20relation.%3Cbr%20/%3E%3Cbr%20/%3EAccueil%20a%20inclu%20le%20message%20personnel%20suivant%20:%3Cbr%20/%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cspan%20style=[/code:1]

and
[code:1]icontes.com/Accueil/?tab=1]Accueil[/url]%3C/span%3E%20demande%20de%20se%20mettre%20en%20relation%20avec%20vous.%20Ceci%20n%E9cessite%20votre%20approbation.%20Merci%20d'accepter%20ou%20refuser%20la%20relation.%3Cbr%20/%3E%3Cbr%20/%3EAccueil%20a%20inclu%20le%20message%20personnel%20suivant%20:%3Cbr%20/%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cbr%20/%3E%3Cspan%20style=[/code:1]

Please Log in to join the conversation.

16 years 3 months ago #56064 by slabbi
Well maybe a side effect because of my fixes yesterday, I have removed the code which I added to fix your problem again and updated the plug_pms on svn again.

The links works fine on my installation. Can you make a two screenshots please: 1. of the link shown in uddeIM and 2. of the html source of the message.
And I what is stored in the database?

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

Please Log in to join the conversation.

16 years 3 months ago #56066 by alterna
I have attached the three files : screenshot of the output message, html source code and screenshot of the database

I have removed svn version of plug.uddeim.php and reinstalled the basic 1.0 one

Hope you can fix it and sorry for all the language mess with CB :( :whistle:


Attachment Archive-322d50976f6b6cb9521be8c238ae9641.zip not found

Attachments:

Please Log in to join the conversation.

16 years 3 months ago #56075 by slabbi
I am not quite sure but it seems that your regexp function is broken (there are some php versions with regexps bugs):

This is the code I use:

[code:1]$string = preg_replace("/\(.*?)\[\/url\]/si", "<a href=\"\\1comprofiler\\2\" target=\"_top\">\\3</a>", $string);
[/code:1]

In your picture we see that the text starts with "[ u r l = " (I added spaces to avoid replacing by this forum) and ends with "target=_top"). So the \1 - \3 parameters were replaced correctly but the beginning "<a href=" is missing.

Could you post your php version number please? Maybe this is the problem here.

Post edited by: slabbi, at: 2008/02/05 13:48

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

Please Log in to join the conversation.

16 years 3 months ago #56076 by slabbi
Just one try because I have no other reports actually according this:

Could you modify the language file that it does not contain a special character in "Gérer les relations", e.g. "Gerer les relations"?

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

Please Log in to join the conversation.

16 years 3 months ago #56078 by alterna
My PHP version is 5.1.6 on fedora

I tried to change "gérer" to "organiser" but this did not change anything.

Here is the source code of what I got when refusing a connection for instance:
[code:1]NOTE: Ceci est un message généré automatiquement par le système de mise en relation. Il contient l&#039;adresse de l&#039;utilisateur connecté qui souhaite entrer en relation avec vous, vous pouvez donc y répondre si vous le souhaitez.<br />
<br />
Votre demande de relation à <span style="font-weight: bold"><a href="icontes.com/Ma-cabane/jcm/?tab=1]jcm[/url]</span> a été refusée !<br />
<br />
<br />
[url=http://icontes.com/index.php?option=com_comprofiler&amp;Itemid=43&amp;lang=fr&amp;task=manageConnections" target="_top">Organiser les relations
[/code:1]

So it seems that the first <a href in the first link went ok but that the tag was not closed before the end of the second link thus messing both links

The first one refers to the profile and the second to the connections

Does it help ?

Please Log in to join the conversation.

Moderators: beatnantslabbikrileon
Time to create page: 0.232 seconds

Facebook Twitter LinkedIn