开发者

How to make C# show arabic?

I have a problem that while writing a C# code the output sometimes is words arabic language,and it appears as a strange sym开发者_高级运维bols,how to make C# read and show arabic??


I don't know the precise problem you're having, but would suggest you read The Absolute Minimum Every Programmer Should Know About Unicode to give yourself a solid grounding in this often confusing topic.


Arabic Console Output/Input is not possible on Windows Platforms, according to Microsoft: http://www.microsoft.com/middleeast/msdn/arabicsupp.aspx#12


C#/.NET will display Arabic characters without a problem, as it represents string internally as UTF-16.

The issue is with how you display the characters.

If you are on the web, you need to ensure that your are including the correct charset encoding header or meta tag for the output.

Please provide more information on where you don't see the characters, and how you are outputting the strings.


maybe it is a problem with your system language, go to Control Panel then to Language options and try to change you System Local Language to Arabic and ensure that the language for non-Unicode programs is arabic.


Please make sure that you have correct fonts installed. If you have them on your system, it could be a fallback mechanism problem.

For web pages (Asp.Net), please make sure that:

  1. You are using (and declaring) correct encoding.
  2. You have correct fonts declared in your style definition.

I know that it sounds strange, but for Internet Explorer, it helps to set language for non-Unicode programs to what you need to support (in my case it was Chinese Simplified on German Windows 2003).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜