Developer forum

Forum » Templates »  Render danish/foreign characters in template engine error

Render danish/foreign characters in template engine error

Kasper Skov
Reply

Both razor and old html template engine aren't rendering characters like ÆØÅ.  <globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" /> is set. Text from the database is rendered correctly.

What am I doing wrong?


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

You have to make sure that you save your template files with the right encoding, i.e. utf-8. Otherwise your Danish characters (and other exotic ones) may end up looking like this

�blegr�d

Best regards,
Mikkel

Votes for this answer: 1
 
Kasper Skov
Reply

For anyone else having this problem. You can change the encoding on the files in Visual Studio by choosing "Save as" in the File menu. Press the extend arrow on the save button and choose UTF-8 (second from the top i think).

 

You must be logged in to post in the forum