3

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
  • I know this comment is very late , I am facing the same issue, did you find any solution – Amro Mustafa Jul 31 '22 at 10:30

1 Answers1

3

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
  • I was experiencing this problem on a static site hosted in an Azure Storage Account. Some unicode emoji weren't displaying correctly. Adding this meta tag fixed the problem. It did work locally when served through Live Serve in VS Code. – Jon Turner Dec 31 '22 at 03:18