Skip to content

Not support Chinese for enum context #19298

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

Closed
tarekgh opened this issue May 5, 2017 · 3 comments
Closed

Not support Chinese for enum context #19298

tarekgh opened this issue May 5, 2017 · 3 comments

Comments

@tarekgh
Copy link
Member

tarekgh commented May 5, 2017

@idoop commented on Fri May 05 2017

when I do dotnet build or dotnet pack ,an error occurred:

root@DevEnv:~/TL.SysData# dotnet build
Microsoft (R) Build Engine version 15.1.1012.6693
Copyright (C) Microsoft Corporation. All rights reserved.

DTO/Nature/RegionHelper.cs(159,67): error CS1001: Identifier expected [/root/TL.SysData/Source/TL.SysData.csproj]
Res/RdsPrex.cs(23,1): warning CS1570: XML comment has badly formed XML -- 'Expected an end tag for element 'summary'.' [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(159,67): error CS1002: ; expected [/root/TL.SysData/Source/TL.SysData.csproj]
Res/RdsPrex.cs(24,13): warning CS1570: XML comment has badly formed XML -- 'End tag was not expected at this location.' [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(159,67): error CS1056: Unexpected character 'ֱ' [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(159,69): error CS1002: ; expected [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(159,69): error CS1056: Unexpected character '�' [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(159,70): error CS1056: Unexpected character '�' [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(218,24): error CS1001: Identifier expected [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(218,24): error CS1056: Unexpected character 'ֱ' [/root/TL.SysData/Source/TL.SysData.csproj]
DTO/Nature/RegionHelper.cs(218,25): error CS1003: Syntax error, ',' expected 
....
....
DTO/Nature/RegionHelper.cs(246,28): error CS1056: Unexpected character '�' [/root/TL.SysData/Source/TL.SysData.csproj]
/usr/share/dotnet/sdk/1.0.3/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(92,5): error : Cannot find project info for '/root/TL.SysData/Source/TL.SysData.csproj'. This can indicate a missing project reference. [/root/TL.SysData/Test/UnitTest/UnitTest.csproj]

code: enum value:

    public enum Region 
    {
        直辖市 = 1 << RegionHelper.Provincelmove,
        上海市 = 直辖市 | 1 << RegionHelper.Citylmove, 
        黄浦区 = 上海市 | 1 << RegionHelper.Districtlmove,
        ...
        ...
    }

...
...
    public static bool IsCCity(this Region region)
    {
        return region.IsCity() && region.Province() == Region.直辖市;
    }

But use VS2013/15/17 build it on windows: Success.
And i saw #7804, so i set this proj charSet UTF-8,and no BOM.Then build ,same error info.

Expected behavior

Build Success.

Actual behavior

error.....

Environment data

dotnet --version
1.0.3

cat /proc/version
Linux version 4.4.0-77-generic (buildd@lgw01-59) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017

Code File:Region.cs,RegionHelper.cs


@karelz commented on Fri May 05 2017

That looks like Roslyn I18N bug -- @jaredpar can you please confirm?

@jaredpar
Copy link
Member

jaredpar commented May 5, 2017

@agocke when did we make the fix about encoding and CoreCLR compilers?

@agocke
Copy link
Member

agocke commented May 5, 2017

@jaredpar #16308

@jaredpar
Copy link
Member

This should be fixed now that the compiler bits are merged into CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants