View Full Version : character encoding
cyberdread
05-11-2005, 02:59 PM
I cant find a guide to choosing the right charset for my meta tag to add to my html. I also need one for my external stylesheets.
How do I choose a char set? I cant find anything that actually tells me.
is it based on the language I type in? the functions I use in my code? my star sign??? what?? how? ahhhh
Hi,
That's an under-rated tag....
the character set you use depends on your market (european or US etc...)...
I use this tag
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
and I find it does very well for scandanavian and west and east european referrals ... not so well for US though...
Which language are you writing for?
Cheers,
Paz.
cyberdread
05-12-2005, 02:15 AM
Im writing html and css (external style sheets) and maybe some javascript.
I still dont understand the use of a charset.
So if someone in china with a chinese keyboard typed a webpage in chinese characters and used a charset my browser would identify the charset and switch it to english characters which wouldnt make any sense becuase it would be a bunch of jumbled up english letters.
I thought americans speak english? do they have different keyboards or something?
I didnt even know char-sets existed until yesterday so forgive my ignorance.
cyberdread
05-12-2005, 02:16 AM
what market? well basically I want anyone who can understand english to be able to read my webpage......... rite?
Hi...
It's a big topic... but I'll have a stab...
Chinese visitors apart, I guess you mean charset problems such as an "Æ" in Finland appears as a "™" here in Turkey?
Well you are right, a browser has to decide which character set to use to display a page and gets a bit of help from the html coding with the "charset" metatag. These days, browsers have good international support and most things display OK, but you can sometimes help by using metatags:
Most people in the US use this metatag:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
I prefer to use the european characterset because I'm targetting EU and east european referrals for my english pages:
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
(In practice the pages will look identical most of the time, but they rank better in google.ro, for example, even though my pages are in english and I'm using a US server.)
You shouldn't/can't use any special character codes in your CSS and javascript functions, and they are best left as a-z A-Z 0-9 to avoid any problems.
For your javascript and html text you should use only ASCII characters too... if you need to make "Ü" or an "&" you should use the "escape characters":
ie ¨ and & to be sure that they will display the same in all character sets.
eg <h1>Bed & Breakfast </h1>
- but even that's not always necessary - just good practice
So short answer.... bash in your text, let the browser sort out the display... don't lose any sleep over it... :nap:
Cheers,
Paz.
cyberdread
05-16-2005, 12:20 AM
ill have to do some research on the subject, This is all entierly new to me.
Is ther anything else thats standerd for web development? any other standerd publishing needs?
[QUOTE=cyberdread]ill have to do some research on the subject, This is all entierly new to me.
Is ther anything else thats standerd for web development? any other standerd publishing needs?[/QUOTE]Hmmmm... a spelling checker maybe.... ;)
But seriously, you should install another browser other than IE to look for problems with your layout. I would recommend Firefox... Sometimes generated pages look completely messed up in other browsers....
Cheers,
Paz.
vBulletin v3.0.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.