in reply to Re: UTF-8 to ISO-8859-1 conversion of euro symbol
in thread UTF-8 to ISO-8859-1 conversion of euro symbol

Thank you for the clarification. I had just ISO-8859 written on my notes and assumed I meant -1. I have changed my encoding to ISO-8859-9.

Unfortunately, this has the same result using the utf-8 typed euro character: I am given whitespace by from_utf8(). A stand-alone test case also shows that as the response from the function.

  • Comment on Re^2: UTF-8 to ISO-8859-1 conversion of euro symbol

Replies are listed 'Best First'.
Re^3: UTF-8 to ISO-8859-1 conversion of euro symbol
by gellyfish (Monsignor) on Mar 03, 2005 at 14:30 UTC

    As mirod pointed out I was typing crap - it is (confusingly) iso-8859-15 you should be using. Are you sure that whatever it is that you are using to look at the output is actually using the correct character set to display the euro character from that encoding? There is also a windows cp1252 that includes the character but with a different numeric code.

    /J\

      I am not 100% certain that the encoding at the other end is an ISO-8859 variant. It does correctly display other characters encoded in ISO-8859, however, such as ø.

      So, if I have 8364 in utf-8, that's transformed to 164 in ISO-8859-15. 0164 in Windows CP1252 is what I'm seeing...so I will see if switching the encoding helps.

      Thanks for all the help!

      Working on the theory that I might need cp1252 encoding, I modified my original code to convert to charset cp1252. The result is whitespace.