Let's look at an example: there is a German word: Fußgängerübergänge
What I have:
web.config file:
... <system.web> <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto" /> ...
resource file containing this word:
<?xml version="1.0" encoding="utf-8"?> <root> ... <data name="TestWord" xml:space="preserve"> <value>Fußgängerübergänge</value> </data> ... </root>
The html page hard-coded the same word and with the help of this resource refers to this word, and also extracts this word from the database:
... <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ... </head> <body> <div>Fußgängerübergänge</div> <div>@Model.SameWordFromDbTable.TestWord</div> <div>@Resources.MyResource.TestWord</div> <div>@MvcHtmlString.Create(Resources.MyResource.TestWord)</div> </body> ...
When I check them in the source code of a web page, they are displayed in two different ways:
... <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ... </head> <body> <div>Fußgängerübergänge</div> <div>Fußgängerübergänge</div> <div>Fußgängerübergänge</div> <div>Fußgängerübergänge</div> </body> ...
Question : what I did wrong, how can I fix this "coding" problem? What if you want the last 2 words to appear in the source code in the same way as the first two?
Bundy source share