We are developing a site that has a Japanese localization. In that site, we display several dynamic fields using asp:label and such controls.
Recently, we were required to display numbers using “double-byte characters”.
While it first I thought that was a confusion from the client, he sent me this in an email:
1234567890
1234567890
and this shows I was wrong, and that indeed there are “wider” number characters available.
Any hint on how to make ASP.NET switch to those dynamically?
Update: The second sample seems be called “FULLWIDTH” characters. The question could be rephrased as:
How do I make ASP.NET automatically display FULLWIDTH numbers when the current culture is JP?
Apparently, there are some other characters in unicode that look just like the ‘normal’ numbers, but display wider by default.
Here’s the text from your question pasted into notepad, saved as unicode, and run through XXD:
It looks like where ‘1’ is 0x0031, ‘special 1’ is 0xff11. If using CSS to display the ‘normal’ numbers, but with a wider font isn’t an option, I’d say you’ll have to take the number, convert it to a string, add 0xff10 to every character between 0x0030 and 0x0039 to get what you’re looking for.