ISO 2022-JP (JIS) 文本编解码器
JIS 编解码器支持与 ISO 2022-JP 之间的相互转换。
环境变量UNICODEMAP_JP 可用于微调JIS、Shift-JIS和EUC-JP编解码器。映射名称遵循日本XML工作组的《XML日语配置文件》(XML Japanese Profile),因为该文件对所有广泛使用的映射进行了命名和说明。以下是由Serika Kurusugawa撰写的简要说明:
- “unicode-0.9”或“unicode-0201”用于 Unicode 风格。这假设 0x00-0x7f 范围采用 JISX0201。(0.9 是用于 Unicode 1.1 的 jisx02xx 映射的表格版本。)
- “unicode-ascii” 该配置假设 0x00-0x7f 范围采用 US-ASCII;部分字符(JISX0208 0x2140 和 JISX0212 0x2237)与 Unicode 1.1 不同,以避免冲突。
- “open-19970715-0201”(为方便起见,也可称作“open-0201”)或“jisx0221-1995”,用于 JISX0221-JISX0201 风格。 JIS X 0221 是 Unicode 的 JIS 版本,但其中几个字符(0x5c、0x7e、0x2140、0x216f、0x2131)与 Unicode 1.1 不同。 当 0x5c 被视为日元符号时,应使用此选项。
- “open-19970715-ascii”(为方便起见,简称“open-ascii”)用于 JISX0221-ASCII 风格。当 0x5c 被视为反斜杠时,应使用此设置。
- “open-19970715-ms”(为方便起见,简称“open-ms”)或“cp932”用于 Microsoft Windows 样式。 Windows 代码页 932。某些字符(0x2140、0x2141、0x2142、0x215d、0x2171、0x2172)与 Unicode 1.1 不同。
- “jdk1.1.7”用于 Sun 的 JDK 风格。与 Unicode 1.1 相同,但 JIS 0x2140 映射为 UFF3C。0x00-0x7f 范围可使用 ASCII 或 JISX0201。
此外,还支持“nec-vdc”、“ibm-vdc”和“udc”这三种扩展。
例如,若要使用 Unicode 风格的转换但采用 NEC 的扩展,请将 `UNICODEMAP_JP ` 设置为 `unicode-0.9, nec-vdc`。(在 shell 命令中,您可能需要将该值用引号括起来。)
此处的大部分代码由 Serika Kurusugawa(又名 Junji Takagi)编写,经作者许可并承蒙 Qt 团队的衷心感谢,现已纳入 Qt。
另请参阅 文本编解码器:ISO 2022-JP(JIS)。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.