How to handle non-English characters in web.config?

I have some non-English characters that are stored in my web.config file. I can save, close and reopen the file in notepad, and everything looks good.

When I try to run the application, I get this error: the configuration file is not valid XML.

How to store non-English characters in web.config?

0
source share
1 answer

Have you added a regular XML encoding header?

<?xml version="1.0" encoding="UTF-16"?> 

In addition, you will need to save the file in the appropriate format.

+3
source

Source: https://habr.com/ru/post/1247664/


All Articles