in reply to How to avoid decoding string to utf-8.
Without seeing the strings and the code ("this one works" -- what does it mean?), we can only guess what you're trying to solve. The problem has no general solution, as an input that's valid UTF-8 might also have meaning without decoding (for example, the bytes c3 83 c2 a5 correspond either to four bytes, or two characters Ã¥, which is an unusual combination usually coming from a double encoded letter å - but what it really is depends on what you want to do with it).
|
|---|