Displaying Japanese fonts in source code using Visual Studio

前端 未结 7 2401
栀梦
栀梦 2021-01-02 05:04

I have some source files that have comments written in Japanese. When I open these files in Visual Studio they appear like this:

à–¾FNCAP‰¹—p‚̃XƒŒƒbƒh
         


        
7条回答
  •  情歌与酒
    2021-01-02 05:54

    I faced the same issue and have found a solution that works for me.

    The problem is that the files aren't unicode and VS is trying to open them with an encoding that matches your location. Luckily, you can set Windows default behavior for non-unicode files. Check out this link, http://msdn.microsoft.com/en-us/library/ms246590.aspx. Look under "To correctly display characters that are not included in the current code page."

    These directions are incorrect for Windows 8 (I can't speak for 7 or older.) For Windows 8:

    1. Navigate to Control Panel
    2. Select Clock, Language, and Region (yeah they still have the comma before and)
    3. Region
    4. Administrative
    5. Change System Locale...
    6. Select the desired language from the "Current System Locale" drop down

    Most of your programs should continue to function in English as this setting is only applied when programs and files don't support unicode.

提交回复
热议问题