ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.76k stars 2k forks source link

Build errors in Simplified Chinese Windows #327

Open kice opened 9 years ago

kice commented 9 years ago

When i build source sdk, there are huge amounts of warning C4819 or code page error. Because different language use different code page. And most of the error is created by ® (BF3 also can cause error while running in SC Windows due to this ®).

Here is some of the files containt the character. But i will make some mistakes because many files have it.

Please check the whole project!!

source-sdk-2013\mp\src\public\tier1\UtlSortVector.h source-sdk-2013\mp\src\tier1\source-sdk-2013\mp\src\tier1 source-sdk-2013\mp\src\public\steam\isteamremotestorage.h source-sdk-2013\mp\src\public\steam\matchmakingtypes.h source-sdk-2013\mp\src\public\steam\steamhttpenums.h source-sdk-2013\mp\src\public\steam\steamcontrollerpublic.h source-sdk-2013\mp\src\public\steam\isteamclient.h source-sdk-2013\mp\src\public\steam\steamclientpublic.h source-sdk-2013\mp\src\public\steam\isteamutils.h source-sdk-2013\mp\src\public\steam\steamuniverse.h source-sdk-2013\mp\src\public\steam\steam_gameserver.h source-sdk-2013\mp\src\public\g15\ig15.h source-sdk-2013\mp\src\public\shaderlib\cshader.h source-sdk-2013\mp\src\materialsystem\stdshaders\screenspace_general.cpp

hozuki commented 9 years ago

This problem already exists in previous versions, such as Source SDK Base 2007. When I try to edit the files Visual Studio prompts to standardize line endings (CR vs. CR-LF), and when I try to save the files VS prompts the incompatibility between GBK and some characters used. I have to manually suppress the warnings, especially when the Regard Warnings As Errors option is turned on. Visual Studio uses system locale, whose character set is GBK on Simplified Chinese version of Windows, rather than UTF-8 or ANSI on *nix or English version of Windows.

My suggestion is that the "®" character should be replaced by "(R)" as in many other projects, to avoid charset warnings or errors.