2

I have an Arabic ASP.NET MVC4 website with UTF-8 encoding.

I have declared the encoding as UTF-8 in html layout header and have tried to set globalization settings in web.config.

but when I publish in windows azure. some of the text appears in Arabic characters while others appears in weird characters.

In localhost all the text is Arabic.

To give a live example take a look at the front page: http://alqalam.azurewebsites.net and look at the top left text. You can also look at http://alqalam.azurewebsites.net/Account/Login

both links show how some characters are displayed in Arabic and others aren't.

Thank you.

  • Your issue is most probably encoding of the file (.CSHTML) itself. When using non-ascii characters make sure you are saving the views as UTF-8 encoded. Try `File` => `Save As` => `Save with Encoding` and choose `Unicode (UTF-8 With Signature)` – astaykov Aug 19 '13 at 09:04

1 Answers1

2

can you try adding ?

<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />
  • That didn't work, maybe this isn't related to html because some text appear in Arabic characters on the same page. Thank you. – ZainAlabdin Aug 05 '13 at 18:31
  • To give a live example take a look at the front page: http://alqalam.azurewebsites.net and look at the top left text. You can also look at http://alqalam.azurewebsites.net/Account/Login both links show how some characters are displayed in Arabic and others aren't. – ZainAlabdin Aug 06 '13 at 01:35
  • We have a problem that Azure App Service displayed incorrectly the accented characters of a static website (Jekyll) and we had to put this line to the beginning of the head and it has solved the issue! Thank you for saving our lives! – Dominik Sep 23 '19 at 16:43