Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

All project files are in non-UTF encoding #259

Closed

Description

@ysilvestrov

All project files after yeoman generator are created in non-UTF encoding (in my case - Windows 1251), which lead to national characters (in my case - Cyrillic) are corrupted.
After resaving from Visual Studio with UTF8 encoding, the issue has gone.

Activity

  1. SteveSandersonMS commented on Aug 15, 2016

    @SteveSandersonMS
    Member

    Can you give repro instructions?

    I'm not 100% sure what you mean when you say the files are saved in a non-UTF encoding, given that without a BOM (which the files don't have) or any special chars (which the generator doesn't itself put in the files), the UTF-8 encoding of the file is bitwise-identical with ASCII. As such, I'm not clear how it's meaningful to say the files are in one encoding or another. Only when you edit them to include some extended-range characters would a difference appear, and then it's your choice of encoding when you save the edited file.

    No doubt you are correct that there's something for us to fix here - I'm just not sure what, so would appreciate specific steps that show something going wrong! Thanks.

  2. SteveSandersonMS commented on Aug 18, 2016

    @SteveSandersonMS
    Member

    In the absence of more info, I'll close this, but if anyone is able to provide repro information, please let us know!

  3. ysilvestrov commented on Aug 28, 2016

    @ysilvestrov
    Author

    Looks like it's rather up to VS2015.
    However, to reproduce it, you need the following (Win 10 anniversary update x64, VS2015 community edition, Windows 1251 is set as system default for non-UTF):

    1. generate the Angular2 project using yo aspnetcore-spa
    2. try to edit e.g. the Startup.cs file with Notepad++. It shows that the file is in UTF8 encoding.
    3. open the generated .xproj file with VS2015
    4. open Startup.cs from within VS2015, add some Cyrillic chars, save the file
    5. open Startup.cs with Notepad++ - it shows that file is in Windows 1251 encoding
    6. save Startup.cs from VS2015 setting the encoding to UTF8 - now everything works right.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions