Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird character "Â" before degrees Celcius symbol "°C"

Tags:

c#

unicode

I asked this question a day ago regarding Greek Unicode characters, and now I have a question which builds upon that one.

After extracting all my data, I have attempted to prepare it for import into Excel. I had to chose a tab delimited file because some of my data contains commas (lucky me!).

The issue I'm running into is a very weird character after I import the data into Excel.

The column data in Notepad++ looks like this:

Total Suspended Solids @105°C   

The Excel cell data looks like this:

Total Suspended Solids @105°C

I don't understand why this is happening. Does this have something to do with how the degrees symbol is represented?

p.s. I the symbols in this question are direct copy and paste

like image 846
Chris Avatar asked Sep 10 '09 17:09

Chris


People also ask

How do I type the degree symbol in C?

Press and hold the ALT key and type 0 1 7 6 on the numeric keypad of your keyboard. Make sure the NumLock is on and type 0176 with the leading zero. If there is no numeric keypad, press and hold the Fn before typing the 0176 numbers of degree symbol.

What is the Ascii code for degree symbol?

Inserting ASCII characters For example, to insert the degree (º) symbol, press and hold down ALT while typing 0176 on the numeric keypad.


1 Answers

  1. (More likely) Excel is interpreting your textual data as latin-1 or windows-1252, and not UTF-8. "°" is what you get if you take the UTF-8 bytes for "°" (0xc2 0xb0) and interpret each byte as a character of latin-1 or windows-1252. Is there an option for input encoding when you do your import?
  2. (Less likely) Excel is doing the right thing, but you're double-encoding your data (encoding as UTF-8, then re-interpreting it as an 8-bit encoding and encoding again as UTF-8 or any other Unicode encoding). Notepad++ evidence is against this one.
like image 147
hobbs Avatar answered Sep 28 '22 16:09

hobbs