Skip to content

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

Open
kubo wants to merge 1 commit intogdabah:masterfrom
kubo:suppress-warning-c4819
Open

Suppress warning C4819: The file contains a character that cannot be represented in the current code page (932) on Japanese Windows#179
kubo wants to merge 1 commit intogdabah:masterfrom
kubo:suppress-warning-c4819

Conversation

@kubo
Copy link
Copy Markdown

@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.

1 participant