10 February 2005
UTF-8 Woes
I have come across a strange bug (at least I think it's a bug) in Internet Explorer.
As I mentioned yesterday I am starting work on a project that needs multi-lingual pages. As it happens I have been working on a smaller project first (for the publishers of the Engvocab.com book), and their website needs to have (to start with) English, Welsh and Japanese pages.
I quickly learned that to have special welsh and Japanese characters display on a HTML page, the document must be UTF-8 encoded. No, biggie, I thought.
UTF-8 Includes
Now, on this website I will be using PHP to allow me to switch easily from (Yes I do chop and change between ASP.net and PHP – depending on what is more appropriate) one language to the other. Certain things, such as the navigation, will need to change in the template file depending on the selected language. For this reason the Navigation comes in via a PHP Include.
The strangest thing is that when I have an included file encoded in UTF-8, Internet Explorer adds a space before the first element of approximately 15 pixels. At a moment my solution it to have a separate CSS document for IE (Using conditional comments) with a negative top margin for the effected elements.
I haven't got a clue why this is happening, or what I can do about it. Anyone else ever heard of this?
- Time: 13:18
- Ask the Audience
Comments ( 0 )
Sorry, commenting has been disabled for a while. I am getting a stupid amount of comment spam, and need to find a new way of doing things.
I will not publish your email address, but I may use it to get in contact with you.
HTML tags and entities display as source; they do not render. To create a live link, simply type the URL (including http://).