zoukankan      html  css  js  c++  java
  • 解决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]

  • 相关阅读:
    NodeMCU快速上云集锦
    云数据库 MySQL 8.0 重磅发布,更适合企业使用场景的RDS数据库
    MySQL 8.0 技术详解
    为更强大而生的开源关系型数据库来了!阿里云RDS for MySQL 8.0 正式上线!
    阿里云CDN技术掌舵人文景:相爱相杀一路狂奔的这十年
    容器服务kubernetes federation v2实践五:多集群流量调度
    Helm V3 新版本发布
    Serverless助力AI计算:阿里云ACK Serverless/ECI发布GPU容器实例
    详解TableStore模糊查询——以订单场景为例
    洛谷P2727 01串 Stringsobits
  • 原文地址:https://www.cnblogs.com/xuesong/p/1835394.html
Copyright © 2011-2022 走看看