• Welcome to Simple Machines Community Forum. Please login or sign up.

Proposed I18N fix for non-break space and e-mail encoding issues

Started by taka, January 02, 2006, 05:48:08 PM

Previous topic - Next topic

taka

Hi.

I've fixed following issues and attached proposed fixes at the URL in the end of this message.


  • Hard coded non-break character mangles UTF-8 text
  • E-mail message doesn't get sent in appropriate charset encoding

These issues have been found and reported as following topics:

http://www.simplemachines.org/community/index.php?topic=53070.0
http://www.simplemachines.org/community/index.php?topic=62907.0

For non-break space fix, it checks the current charset encoding being used, and if it's UTF-8, it ignores \xA0.  Otherwise, it assumes it's Latin encoding and replace them.  In other words, unless you change the charset to UTF-8 in Settings.php, it doesn't do anything.

For the e-mail fix, it takes advantage of PHP's standard mbstring library if it's available.  It can be enabled/disabled thru modSettings['use_mbstring'].

http://hiko-ki.com/patch_20060102.zip [nofollow]

NOTE: The zip file contains modified 1.1 RC1 files.

spiros

Taka,

Yes, I can see what it does, it does not corrupt the last character in latest posts. In this message there is a hack for this too, but I have a feeling you have done more detective work.

Now if you can help with the problem with RC2 that would be great!

Advertisement: