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

Fix MSVC warning C4819 #882

Merged
merged 1 commit into from Dec 17, 2017
Merged

Fix MSVC warning C4819 #882

merged 1 commit into from Dec 17, 2017

Conversation

erengy
Copy link
Contributor

@erengy erengy commented Dec 17, 2017

I get the following warning when I compile v3.0.0 with Visual Studio 2017 15.5.2 on a Windows machine with Japanese system locale:

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

MSDN explains:

C4819 occurs when an ANSI source file is compiled on a system with a codepage that cannot represent all characters in the file.

This happens due to a U+00A0 character, introduced in 21d2398.

Assuming that it was unintentional, this PR replaces the UTF-8 byte sequence (0xC2 0xA0) with a regular space character (0x20), rather than saving the file in Unicode format.

Replaces a U+00A0 character with regular space, and fixes a typo.
@nlohmann nlohmann added the platform: mingw related to MinGW label Dec 17, 2017
@nlohmann nlohmann added this to the Release 3.0.1 milestone Dec 17, 2017
@nlohmann nlohmann self-assigned this Dec 17, 2017
@nlohmann
Copy link
Owner

This was indeed unintentional. Thanks for reporting!

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling ab0e8b2 on erengy:fix-msvc-c4819 into 1ca6ec1 on nlohmann:develop.

@nlohmann nlohmann merged commit e54b6ac into nlohmann:develop Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: mingw related to MinGW
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants