URL-How to Read unicode Chinese string


Hi Juce,

I’m using URL.readEntireBinaryStream function to read some Chinese string(Encode in UTF-8), store it to MemoryBlock, but when I use toString() fuction, it returned me some mess code Chinese string. And I also test toUTF8() function, no help.

I have tested using IE for the same url, show mess code for Chinese string. But when change “View”->“Encoding”->“Unicode(UTF-8)”, IE will show the right Chinese string.

So, how can I get the UTF-8 Chinese from Juce:URL?



I’m very confident that all the utf8 string handling in juce is correct, so if it really is a utf8 string, then the contents of your String object will almost certainly be correct.

What’s more likely to be going wrong is whatever mechanism you’re using to examine the contents of that string. You didn’t say how you’re doing that.