CoreTemplatePack icon indicating copy to clipboard operation
CoreTemplatePack copied to clipboard

UTF 8 characters don't render in AngularJS 2 template

Open Elvin1492 opened this issue 8 years ago • 2 comments

We create angularJS2 application. In some component utf8 character shown normally but some don't. Specially templates that come from router-outlet. I think this extension has some bugs.

Elvin1492 avatar Oct 29 '16 11:10 Elvin1492

For issues specifically with the Angular template, would you be able to post them to https://github.com/aspnet/JavaScriptServices/issues? That's where we're building the template contents.

In this case, please be sure to provide repro steps. I'm not sure how to create the problem you've described (I just tried for example putting the character 'Ꮿ' in the middle of one of the templates in the generated Angular 2 app, and it rendered fine).

SteveSandersonMS avatar Nov 07 '16 17:11 SteveSandersonMS

I'm pretty sure this has nothing to do with the extension, but is because of Visual Studio for some reason always saving files in ANSI, not UTF8. There's another extension that solves this though, called ForceUTF8. You can find it here: https://marketplace.visualstudio.com/items?itemName=vilicvane.ForceUTF8 or https://marketplace.visualstudio.com/items?itemName=jz5.ForceUTF8withBOM Use the latter if you need UTF8 with BOM. Both should do, but I tried with BOM and it worked in my case. I haven't tried it with this extension though, so cannot promise that it solves your particular problem.

If you use Visual Studio Code, it saves in UTF8, so it's no problem. Visual Studio, however, doesn't seem to not understand the issue of forcing ANSI on the world though.

HugCoder avatar Dec 08 '16 22:12 HugCoder