Revision [16713]
This is an old revision of HandlingUTF8 made by SpoZga on 2007-05-31 10:39:17.
Real Multilanguage Support
See also:
- List of WikkaSites sites powered by Wikka in 35 languages.
- Current CategoryDevelopmentI18n i18n/l10n development pages.
- Test page for WikkaMultilanguageTestPage multilanguage support
Here's some code to provide real multilanguage support.
The first 3 functions are used within the functions that do the real enconding conversions.
str2utf8, str2ascii and str2iso8859 can take any encodend string and convert it into the desired encoding: ascii plus unicode entities for html output, iso8859-1 plus unicode entities for database storage and utf8 for forms.
Unfortunately the ascii and iso8859 output is not compatible with htmlspecialchars. This is the reason of a valid_xml function. It has the same scope of htmlspecialchars , but will correctly handle