Ahmed Waheed
Ahmed Waheed

Reputation: 1291

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 symbols,how to make C# read and show arabic??

Upvotes: 4

Views: 7297

Answers (5)

Fadi Chamieh
Fadi Chamieh

Reputation: 160

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

Upvotes: 2

Paweł Dyda
Paweł Dyda

Reputation: 18662

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).

Upvotes: 0

Mohamad Alhamoud
Mohamad Alhamoud

Reputation: 4929

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.

Upvotes: 0

Oded
Oded

Reputation: 499262

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.

Upvotes: 1

Brian Agnew
Brian Agnew

Reputation: 272377

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.

Upvotes: 6

Related Questions