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?

Comments ( 0 )

  1. There are no comments yet, be the first and comment now!

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://).

Topics

  • I am more than willing to admit the big gaps in my knowledge on many topics, including web development. This is a topic I use to get help from the community, and my imaginary audience.
    Ask the Audience
  • Even though looking pretty is not the most important layer to a succesful web site (I don't think there is a Most Important), it does help!
    Graphic Design
  • Have you got a sense of?
    Humor
  • The glam, the sadness, the joy, the madness.
    Life of Findel
  • What ever doesn't fit
    Misc
  • I have a crappy camera, but I do try. A good artist always blames his tools.
    Photography
  • Here I chat about projects I am working on, going to work on, or finished. Some of them I will be happy to let you in on, others I will be ashamed of.
    Project Watch
  • Site news and updates
    Site Info
  • Keepin' an eye on the wwwubb
    Watching The Web
  • This topic will be used for talking about all manner of project management issues relating to Wed Development (Wubb Development). Where we may talk about how to code in the Wubb Development topic, we will be more likely to talk about giving quotes, or planning projects, in this topic.
    Working with Wubbs
  • All things Web Development - Web standards, Hacks, Graphics, and more.
    Wubb Development