[TiM's osC Solutions] ISO-8859-1UTF-8 du

for osCommerce Online Merchant v2.3

"INTRODUCTION" osCommerce 2.3.1 is a bit messy in my opinion when it comes to the new introduction of UTF-8 character set. In older versions, everything was ISO-8859-1: * Core source code (ISO-8859-1) * Language pack source code (ISO-8859-1) * Mysql tables (ISO-8859-1) * Mysql I/O (ISO-8859-1) * The html output (ISO-8859-1) * HTML charset definition (ISO-8859-1) In the new version it's different: * Core source code (ISO-8859-1) * Language pack source code (ISO-8859-1) * Mysql tables (UTF-8) * Mysql I/O (UTF-8) * The html output (ISO-8859-1) * HTML charset definition (UTF-8) "WHAT'S THE PROBLEM?" This of course causes terrible problems if you upload a language pack that is ISO-8859-1 source code and contains foregin characters like åäö. Then you say, why not convert the language file contents to UTF-8 then? Well PHP <5.3 does not fully support UTF-8 encoded files so the source code must remain in ISO-8859-1 format. And since the core is ISO-8859-1 any whitespace characters leftovers may come out as broken characters. "WHAT'S THE GUIDELINE THEN?" Well, I am told to use entities for special characters such as ä => &auml; and so on... Becasue all non-foreign ASCII characters are supported in both UTF-8 and ISO-8859-1. That way your language pack is universal for both charsets. But this messes up any non-HTML output. So you're still going to have some unpleasent results. "BUT CAN'T I JUST DEFINE OUTPUT AS ISO-8859-1 LIKE BEFORE?" No! Because when the customer is passing HTML form data that has foregin characters, these will not be displayed correctly when swapping to a UTF-8 language pack for example English. Neither will the data be saved correctly in the database. "SO WHAT DO I DO?" We implement dual support for both ISO-8859-1 and UTF-8 language packs.

Files