Search code examples
htmlutf-8character-encoding

html5 charset=utf-8 is not working for german umlauts


I am trying to show in my new page, the html is of version 5, i set the meta charset to

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

but it is still showing the in this shape: €.

what should i do so that the german chars are properly encoded?


Solution

  • I a program displays “€” when interpreting its data as UTF-8, then the data consists of the bytes D0 B2 E2 80 9A C2 AC. This sounds like the data is all messed up, possibly due to wrong character code conversions.

    On the other hand, since you say that it is still showing this, it is possible that the meta tag has no effect, because it is overridden by an HTTP header (which can only be determined when the URL of the page is available).

    You should first find out what the actual character encoding of the page is. You may need to trace back its origins for this. Then convert it UTF-8 (possibly opening it in an editor that can recognize its current encoding, then saving it as UTF-8 with BOM), provided that the server does not declare another encoding.