0
votes

Our XML feed gives us encoded UTF-8 characters inside ISO-8859-1 a file. This is being fed into the database. So the text is ISO-8859-1 encoded and contains following stuff:

金融市场

Is there a way to convert that into a normal Java string? Similar to:

String str = fromHtmlUtf8("金融市场");

Where resulting str will contain normal UTF8 chars. Chinese in this case, but can be quite mixed.

Thanks.

2
I like this solution: <stackoverflow.com/a/599671/1392882>Miguel

2 Answers