Sublime Forum

UTF-8 Encoding Question

#1

I’m opening a file that is encoded as ANSI. When I “Save with Encoding” as UTF-8 it translates the Degree symbol (hex B0) to hex C2B0 instead of 00B0 as shown in the w3school’s UTF-8 Reference. This causes the file to display incorrectly. What can I do to correct this? Thanks

0 Likes

#2

C2B0 is correct for UTF-8 encoding.
U+00B0 is the Unicode code point.

Or maybe you wrongly take UTF-16 value (0x00B0) ?

fileformat.info/info/unicode … /index.htm
utf8-chartable.de/

0 Likes

#3

Maybe I’m asking the wrong questions. Why does IE9 display “C2B0” as "°’ instead of the degree symbol in an HTML 5 document?

0 Likes

#4

Probably because you didn’t supply a charset meta-directive and IE9 defaults to ANSI.

w3schools.com/html/html_charset.asp

0 Likes

#5

Thank you, that solved the issue.

0 Likes