Author Topic: Proposed I18N fix for non-break space and e-mail encoding issues  (Read 3010 times)

Offline taka

  • Semi-Newbie
  • *
  • Posts: 15

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:

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']. [nofollow]

NOTE: The zip file contains modified 1.1 RC1 files.

Offline spiros

  • Language Moderator
  • SMF Hero
  • *
  • Posts: 1,977
  • Gender: Male
  • A different point of view
    • spiros.doikas on Facebook
    • doikas on LinkedIn
    • @greektranslator on Twitter
    • Greek Translation
Re: Proposed I18N fix for non-break space and e-mail encoding issues
« Reply #1 on: January 02, 2006, 06:19:16 PM »

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!