解决VS2008中日文代码注释乱码的问题

1. 问题描述

开发对日软件外包业务时,开发计算机安装的操作系统一般为日文操作系统。但日常办公的计算机中安装的是中文操作系统,对于日文软件和代码里的注释显示的都是乱码。显然软件在制作时没有考虑多国语言的问题。有时业务繁忙时,会将工作带回家作业,不可避免遇到了日文软件无法使用,以及日文代码注释显示乱码的问题。

2. 系统环境

操作系统:

  • windows XP SP3
  • Windows 7

开发工具:

  • VS2008 sp1

3. 解决办法

3.1. 操作系统安装多国语言包

在控制面板中修改区域语言选项中:“Lanuage for non-unicode programs”的语言选择日文 ;

修改VS2008中"tools"->"options"->"fonts and colors"的“text Edit”字体为MS UI Gothic。

该方法缺点:系统中的原中文软件显示都是乱码,即无法使用操作系统中的中文软件。

3.2. 使用支持多国语言的软件

使用Microsoft AppLocale在VS2008英文版中正常显示日文注释。

3.2.1. What is AppLocale 

微软给出的AppLocale的说明:

Unicode based platforms, such as Windows XP, emulate the language environment required to run non-Unicode applications by internally converting application's non-Unicode text data to Unicode using a system-wide variable commonly called the system local (or language for non-Unicode applications). The language of the non-Unicode applications should be of the same script or family as the one defined by the system locale. Failing to meet this condition results in display of garbage characters in the UI of the application.

This approach has few usability limitations:

- Only an administrator has the ability of setting the system locale value.

- Setting the system locale requires a system reboot.

- Only one system locale can be set at a time.

AppLocale (or Application Locale) is a temporary solution to these limitations caused by non-Unicode applications running on the Unicode (UTF-16) based Windows XP. AppLocale detects the language of the legacy application and simulates a corresponding system locale for code-page to/from Unicode conversions.

3.2.2. AppLocale 的使用方法

以Windoows7为例说明AppLocale的使用方法

i. 打开Microsoft AppLocale向导

clip_image001[4]

ii. 选择启动的应用程序

clip_image002[4]

clip_image004[4]

iii. 选择应用程序显示的语言

clip_image005[4]

iv. 创建启动快捷方式

clip_image006[4]

转载于:https://www.cnblogs.com/xuesong/archive/2010/09/26/1835394.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值