Click here to Skip to main content
13,090,678 members (47,402 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am using microsoft chart and it works great but i dont want show numbers in english mode,
I need to show numbers in 1256 char-set;

any help would be greatly appreciated.
Posted 31-Dec-11 22:45pm
SAKryukov 1-Jan-12 10:30am
What exactly do you want to show? If you see my answer you can understand what do I mean.
Happy New Year!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Where have you been? Even though 1256 charset would work in HTML page, it has been replaced with Unicode, which can be used to support nearly all languages in one text. ASP.NET supports Unicode; using anything else would be quite awkward; I don't even want to discuss it.

Now, do you mean Arabic digits? There are two different meanings in Arabic digits. Commonly used digits '0' to '9' are also called "Arabic" because they have been introduced in Europe by Arabs in X century. If you mean older form of Arabic numerals (٠‎ - ١‎ - ٢‎ - ٣‎ - ٤‎ - ٥‎ - ٦‎ - ٧‎ - ٨‎ - ٩), code points U+0660 to U+0669. This is a different system called "Eastern Arabic Numerals".


Please pay attention: you can also use Persian variant of Eastern Arabic numerals, with each digit using different Unicode code point, even for digit glyphs looking identical. Please see the second link above.

To find any code point, you can use the "Character Map" application bundled with all versions of Windows, charmap.exe.

Now, I'm afraid that if you want to use Eastern Arabic system, you will have to replace the digits by your own code. As far as I understand, in Arabic countries both systems are used, and the use of '0'-'9' is the default. As I learned from the other CodeProject questions, the methods of numeric types ToString(IFormatProvider) will return a string with '0'-'9' digits even if Arabic culture is used as the argument.

For thee usage of IFormatProvider, use the class System.Globalization.CultureInfo which implements this interface.


For example of the usage of ToString(IFormatProvider) (with culture) see, for example System.Int32.ToString with code sample:[^].

You certainly need to understand how Unicode works. See:[^],[^],[^].

Espen Harlinn 1-Jan-12 10:30am
my 5
SAKryukov 1-Jan-12 10:34am
Thank you, Espen.
sjms 2-Jan-12 5:28am
thanks for answring me.
I've been reading and testing whatever you posted.
what i wanted was exactly what you said.
now I've got this :
CultureInfo faCulture = CultureInfo.CreateSpecificCulture("fa-Ir");
faCulture.NumberFormat.DigitSubstitution = DigitShapes.NativeNational
"21".ToString(faCalture) // the output : 21
what i expect is : ٢‎١‎
what should I have wrote.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 1 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100