PDA

View Full Version : HTML characters not showing up properly?


MagSafe
2006-05-28, 17:46
Hey :)

For some reason when the HTML documents that I've made on my mac are uploaded they aren't displaying the apostrophes properly? I'm not sure if this is a normal problem for html editing on mac's but its the first time I've suffered from it :confused: (see here (http://www.smclintock.co.uk/test/))

I've tried it on my Windows laptop and various browsers on there and they aren't displaying properly either ... could it be my text editor?, I'm using TextMate by the way, version 1.5.1 on OS X Tiger.

Hopefully someone has suffered from this and knows of a way to solve it ... as I certainly don't :p

Thanks for any help given,

Steven.

Brad
2006-05-28, 17:48
You're probably not setting the correct character encoding in the HTML.

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) (http://www.joelonsoftware.com/articles/Unicode.html)

;)

MagSafe
2006-05-28, 17:54
Wow, thanks for the super fast reply Brad :err:

I've looked at what I'm saving my files in TextMate as and it's:

File Encoding: UTF8
Line Endings: LF

I haven't had time to read through the entire article yet but do you know if thats the right settings I should be using for PHP files?

Brad
2006-05-28, 18:03
What you probably need is this in your HTML between the head tags:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

MagSafe
2006-05-28, 18:32
Thanks Brad - working perfectly now :D

Will be sure to remember that for future use :)