3 ms·
I'm not saying "try multiple encodings till you get something". I'm asking about the API when the encoding is not static, but provided at runtime, like in XML f
by icebraining 10y ago
I'm not saying "try multiple encodings till you get something". I'm asking about the API when the encoding is not static, but provided at runtime, like in XML files, eg:
<?xml version="1.0" encoding="ISO-8859-1"?>
- majewsky 10y agoYou would have the QByteArray first (e.g. read from a file or socket), parse the <?xml?>, thus find the encoding, convert the rest to QString with that, and parse the rest from the QString.
- icebraining 10y agoMy question is how does one "convert the rest to QString with that", in terms of actual code?