How to add Ⓒ symbol in resource file to support in Japanese Windows OS.

限于喜欢 提交于 2021-02-07 19:39:42

问题


I need to  add copy right symbol Ⓒ in my resource file(.rc). When I add this symbol in '.rc' file and run the app on Japanese OS, it displays ? symbol instead. Below is my code line.

LTEXT "Ⓒ 2017 Comapny Inc. All rights reserved.",IDC_COPYRIGHT,7,30,211,8

I tried editing this symbol on Japanese locale machine machine but still the issue was not resolved. Ⓒ symbol gets converted to ? symbol when I save the .rc file. On Japanese machine I see the above code as below:

LTEXT "? 2017 Comapny Inc. All rights reserved.",IDC_COPYRIGHT,7,30,211,8

 Please share your idea how this can be done 


回答1:


The ANSI code page for the Japanese Windows locale is 932 (similar to Shift-JIS). This encoding does not include the copyright sign (U+00A9 ©), nor the character you mention above (circled letter C, U+24D2 , which is probably not what you wanted). If you are compiling resource files in code page 932, you will have to use plain ASCII (c).

Alternatively if you can convert the RC file to an encoding that supports Unicode you can use any character you like. This could be UTF-16LE (the encoding that Notepad misleadingly describes as “Unicode”), or UTF-8 if you include #pragma code_page(65001) (but then you have to make sure to not edit in the resource editor which will mess that up).



来源:https://stackoverflow.com/questions/42252059/how-to-add-symbol-in-resource-file-to-support-in-japanese-windows-os

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!