How to design an algorithm to convert a UTF-8 string to a unicode string?
Asked
Active
Viewed 632 times
-1
-
2What's a unicode string? You mean a sequence of Unicode code points? – Tadeusz A. Kadłubowski Mar 05 '10 at 19:41
-
12UTF-8 *is* Unicode. What are you actually trying to do? – DaveE Mar 05 '10 at 19:47
-
If this is an interview question, then the questioner probably thinks that "unicode string" and "wide character string" mean the same thing. You can opt to spend interview time educating them, or you clarify whether that's what they mean and move on to the bit where you show them you can write code ;-) – Steve Jessop Mar 05 '10 at 19:55
-
2UTF-8 is one of 'unicode representations'. What is the other representation then? – Jacek Konieczny Mar 05 '10 at 20:00
-
Dupe of http://stackoverflow.com/questions/2287212/how-to-convert-utf-8-utf16-portable/2287344 – MSN Mar 05 '10 at 20:45
1 Answers
1
The commenters are right. Read http://en.wikipedia.org/wiki/Unicode and rephrase question.
UTF-8 is a ''represenation'' of unicode. You probably want to recode to some other interpretation, maybe Java Strings or Microsoft Visual C++ multibyte chracter strings...

towi
- 21,587
- 28
- 106
- 187