On sábado, 31 de agosto de 2013 16:31:19, Syam Krishnan wrote: > > Even “simple English” may contain characters not encodable in Latin 1… > > > > As I've just proven > > Oh.. by 'simple English', I meant basic ASCII.. Anyway, if the original > string contained anything other than ASCII printable characters, > toAscii(), toLatin1() etc can't really do anything, right?
Well, if you meant "if the original string was ASCII, can I convert back to ASCII", the answer is "yes" :-) If the string contains non-ASCII characters: toLatin1() - if the characters are in Latin 1, then the string is safe; if not, they will be replaced by a question mark toAscii() - in Qt 5, the behaviour is undefined; in Qt 4, it depends on the codec set by setCodecForCStrings. The default codec is Latin 1. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest