Uutiset:

Join the Facebook Fan Page.

Main Menu
Advertisement:

Foreign characters

Aloittaja montana, tammikuu 24, 2006, 05:04:45 IP

« edellinen - seuraava »

montana

I'm testing SMF 1.1 RC2.  In the file Sources/Subs-Post.php, line 262, there is code to transform the character with hex number from 0xA0 to become  

Using the UTF-8 character set, 0xA0 is part of a legitimate letter. But this transformation injects some unreadable words into a post.

When I post the words "à la mode" here, strangely, it works.  But on my system with MySQL 4.1.16 or 5.0.18, UTF-8, I can't get that word "a" and the accent on it to appear properly.

I'd tried removing this transformation at the end of line 262, then it seemed to work fine.  But I'm very sure it was there for a purpose.  So I think I better bring this to the attention of somebody here.  Still I'm don't know if this is the right place for me to post this kind of thing or not.


iXô

Same problem, here, gentoo server, PHP  5.1.1, Apache 2, Mysql 5.0.18, everythin is correct exept the letter à, Mysql Collation is utf8_general_ci.

I have to use foreign caracters AND japanese caracters, so utf-8 is for me an obligation.

So I have change the source like montana said and it works great for me, but I think that now, some fonctionnalities are disabled.

Is there a way for solving this problem in a better way ?


// Put it back together!                                                                                                                                     
//if (!$previewing)                                                                                                                                           
//      $message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />', "\xA0" => '&nbsp;'));                                               
//else
//      $message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\xA0" => '&nbsp;'));                                                                 

// Now let's quickly clean up things that will slow our parser (which are common in posted code.)                                                             
$message = strtr($message, array('[]' => '&#91;]', '[&#039;' => '&#91;&#039;'));

Advertisement: