简体   繁体   English

编码问题-Win XP与Win 2003

[英]Encoding issue - Win Xp vs Win 2003

There are 2 machines, one with Xp one with Win 2003. Both are Japanese versions! 有2台计算机,一台使用Xp,一台在Win 2003中。两者都是日语版本!

If you get the available encodings (via Regional Settings or programatically, Encoding.GetEncodings() ) this happens: 如果您获得了可用的编码(通过区域设置或通过编程,Encoding.GetEncodings()),则会发生以下情况:

  1. on Xp, the resulting list is in Latin characters 在Xp上,结果列表为拉丁字符
  2. on Win 2003, the list is in Japanese characters 在Win 2003上,列表以日语字符显示

Some guy at work though to persist the encoding based on its name not on its code and now I have to investigate Japanese machines :) 一些工作的人虽然坚持根据其名称而不是根据其代码进行编码,但是现在我必须研究日语机器:)

Do you know of a way to force Win XP (not 2003) to give the list of encodings in Japanese (remember, the Xp is the Japanese version) ? 您是否知道强制Win XP(不是2003)以日语提供编码列表的方式(请记住,Xp是日语版本)?

This isn't the answer to the actual problem, but I think the best way to handle this is to migrate to code page instead of display name. 这不是解决实际问题的方法,但是我认为处理此问题的最佳方法是迁移到代码页而不是显示名称。

Also, one can detect when a mismatch occurs and force a certain language for their encoding - ex: Japanese. 同样,可以检测出何时出现不匹配,并强制使用某种语言进行编码-例如:日语。 Good thing they all include English as well. 好消息是他们都还包括英语。

To get a little more fancy, you can have a config file to store the code page. 为了更加有趣,您可以使用一个配置文件来存储代码页。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM