Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress warning C4819: The file contains a character that cannot be represented in the current code page (932) on Japanese Windows #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kubo
Copy link

@kubo kubo commented Oct 11, 2021

A comment in src/prefix.c contains two '\x97' bytes. They are em dash characters
in single-byte Windows code pages such as 1252. However they are invalid in
Japanese code page.

This PR replaces em dash with hyphen to suppress the warning C4819.

Without this, compilation using the win32 solution here fails with the following error:

1>prefix.c
1>C:\build\distorm\src\prefix.c: error C2220: 警告をエラーとして扱いました。'object' ファイルは生成されません。
1>C:\build\distorm\src\prefix.c: warning C4819: ファイルは、現在のコード ページ (932) で表示できない文字を含んでいます。データの損失を防ぐために、ファイルを Unicode 形式で保存してください

(translated to English)

1>prefix.c
1>C:\build\distorm\src\prefix.c: error C2220: warning treated as error - no object file generated
1>C:\build\distorm\src\prefix.c: warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss.

…represented in the current code page (932) on Japanese Windows

A comment in src/prefix.c contains two '\x97' bytes. They are em dash characters
in single-byte Windows code pages such as 1252. However they are invalid in code
page 932.

This commit replaces em dash with hyphen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant