4images Forum & Community

4images Help / Hilfe => FAQ, Tips => Topic started by: V@no on July 09, 2009, 05:15:00 PM

Title: UNICODE / UTF8 / UTF16 related
Post by: V@no on July 09, 2009, 05:15:00 PM
Technically UNICODE, UTF8 and UTF16 are little different from each other, but all of them are multi-byte encodings. For the end user (You) such technical details are not important, so in this topic to save time and typing I will refer to all these encodings as one type: UNICODE


There are few aspects needs to be remember when you work with UNICODE and 4images / PHP:

1) your editor must have ability save files without BOM (http://unicode.org/faq/utf_bom.html#BOM). Windows' "Notepad" and "Wordpad" don't have such option, so do not use them. There are plenty of free text/php editors that you can use (a few to mention: notepad++ (http://notepad-plus.sourceforge.net), notepad2 (http://www.flos-freeware.ch/notepad2.html))
If you save files with BOM, you might get bunch of errors, example:
Quote

Warning: Cannot modify header information - headers already sent by (output started at /4images/yourfile.php:1) in /4images/admin/admin_functions.php on line 168

Some editors (UltraEdit) might have problem saving UNICODE files without BOM if original file was saved with BOM. The work around is create a new file, copy text from the original file and then save the new file without BOM.


2) 4images does NOT support .html templates saved in UNICODE. Template files must be saved in ASCII (single byte) encoding.




P.S.
This topic will be updated as more information become available.