* Note: This entry was published elsewhere in 2006.
The Penn State server delivers UTF-8 Unicode pages. Dreamweaver creates Unicode pages. They appear fine in all my browsers without the entity code translation. So I should be able to include Unicode characters in server side includes – right? Not exactly. Hidden UTF-8 character seem to
Any .inc file must be encoded as ASCII and only include ASCII characters. Otherwise you will get an error that the file “cannot be processed”. I suspect the culprit are some hidden Unicode control characters that the server doesn’t recognize. If you want to include a Unicode character (like the £ symbol, you have to use an entity code like £ (all characters in the entity code are ASCII). If you enter raw Unicode, then users will see a question mark, even if the character is actually available in that font.
As for CSS stylesheets, there are not issues technically prohibiting .css files from being UTF-8, but I found out a few years ago that if I placed CSS in UTF-8 files, then attributes would mysteriously fail to apply even though the syntax was correct. Again it was probably a hidden UTF-8 character that was interfering. It’s little glitches like these that make Unicode development still an entertaining adventure even in 2007.
What are “hidden” UTF-8 control characters? These are code points which don’t represent a character but signify text formatting elements like right to left text vs. left to right text or which kind of line break you are using. ASCII has control characters just in positions #0-31 (and most software programs recognize them), but Unicode includes additional control characters that older programs don’t recognize. The problem is that the new control character are included.
By the way, if you cut and paste from a UTF-8 file and see strange behavior in a software package, sometimes backspacing through a “space” will eliminate an unrecognized control character and fix the problem.

Share →

Leave a Reply

Skip to toolbar