سؤال

For my current project i work with include files (.inc) inside visual studio.

What i did is changed some inc files to asp.

But when i consult my page i have a strange behavior with special characters.

Examples André for André

Priv� for privé

When i use html.encode i do not get any good result.

In versioncontrol i noticed the only thing that's changed are the extentions for the include files.

Is this normal behavior ?

What did i mis or do wrong ?

هل كانت مفيدة؟

المحلول

I found the cuase of my problem.

In visual studio each file i create is in UTF-8 encoding.

What i need to do is change the encoding from UTF-8 to ANSI.

Problem solved.

نصائح أخرى

In vs-2019, you can save a file with encoding:

  1. From the File menu, choose Save File As, and then click the drop-down button next to the Save button.

  2. The Advanced Save Options dialog box is displayed.

  3. Under Encoding, select the encoding to use for the file.

[https://docs.microsoft.com/en-us/visualstudio/ide/how-to-save-and-open-files-with-encoding?view=vs-2019#to-save-a-file-with-encoding][1]

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top