Question

I want a clarification about SHIFT-JIS characters set. Is ASCII a subset of SHIFT-JIS character set similar to UTF-8. If a file has mix of SHIFT-JIS and ASCII. how can we read the same using QT codecs?

Was it helpful?

Solution

Is ASCII a subset of SHIFT-JIS character set similar to UTF-8

No: the backslash (0x5C) is missing from SHIFT-JIS and being replaced by a Yen currency symbol.

If a file has mix of SHIFT-JIS and ASCII. how can we read the same using QT codecs.?

By using QTextCodec do properly decode the various pieces; however, detecting how each part is encoded is up to you...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top