Aiden P Aiden P - 1 year ago 64
HTML Question

How to make latin extended work?

I've been googling for some but can't realize how to make letters like

č, ć, ž, š, đ
work. I tried adding
<body lang="sr">
because it actually is Serbian (sr=serbian) but doesn't work. I get this
instead of

I tried adding
<meta charset="ISO-8859-2">
into the head section but still nothing. What am I missing?

Answer Source
  1. Pick a character encoding that supports the characters you want to use. ISO-8859-2 should do the job, but this isn't the 1990s any more. UTF-8 should be the default choice.
  2. Ensure your editor is configured to save in that encoding.
  3. Specify that you are using that encoding with document level meta data: <meta charset="utf-8">
  4. Specify that you are using that encoding in your HTTP response (this takes priority over the document level): Content-Type: text/html;charset=UTF-8.