0

I have a file, index.html, that contains the characters ø, æ, and å. I typed this page in manually on my Danish keyboard and everything displays just fine in the browser.

I create an empty file in the project, called page2.html and save it. I copy the contents of index.html and paste it into page2.html. I load the page in the browser and all æ ø å's are replaced with ���'s.

If I use sublime text, open the file, and paste the very same buffer into the file there, it loads and displays with the æ ø å's intact.

Is there a setting or something I am missing in VS2013 that is making it behave this way? I'd like to copy and paste without spontaneous encoding errors.

Update: It seems to have something to do with the way the file is created or added to the project. If I right click the solution, add, new, HTML page and paste the buffer there the page displays fine.

If I simply drag the file onto the solution root, the encodes get buggered.

Thanks!

TedEwen
  • 38
  • 7
  • VS uses UTF-8 encoding check this question to edit you VS settings to handle those characters http://stackoverflow.com/questions/12276757/change-encoding-on-a-per-file-or-per-extension-basis – csharpwinphonexaml Apr 04 '14 at 15:18
  • The pages are also encoded utf-8. Further, this is for a file where they _should_ be encoded but are not. The answer given is for a specific case where UTF-8 is not desired. – TedEwen Apr 04 '14 at 15:28

0 Answers0