1

I have a list of strings, with unicode characters like <U+00c9>

When I try Encoding(Luc TR<U+00c9>HAN) I get "unknown", charToRaw of Luc TR<U+00c9>HAN gives me 4c 75 63 20 54 52 3c 55 2b 30 30 63 39 3e 48 41 4e.

How can I get them to UTF-8? iconv doesn't work unfortunately...

Kasper Van Lombeek
  • 623
  • 1
  • 7
  • 17
  • So does your character value look like `x<-"Luc TRHAN"` or like `x<-"Luc TR\U00C9HAN"`? It might help to include `charToRaw(x)` so we know exactly what you are working with. – MrFlick Apr 19 '15 at 15:51
  • Question updated, character value looks like "Luc TRHAN" – Kasper Van Lombeek Apr 19 '15 at 16:51
  • Then you do not have a string with unicode characters. You have an ascii string with an attempt at escaping unicode character. See the duplicate answer for one way to extract the unicode escapes and turn them into proper unicode characters. – MrFlick Apr 19 '15 at 17:33
  • 1
    FYI, I added an answer to the duplicate question, for an alternative solution. – bgoldst Apr 19 '15 at 18:47

0 Answers0