How to write numbers in other language in web? - web

My website has two language, English and Persian. When I use Persian language and I write some number, the number shows in English language
For example when I write 67 in Persian unfortunately it show me 67 in English but I write it in Persian (My font is Arial) :
How to write numbers in Persian?

Persian numbers have different unicode codes, f.e english zero 0 is code 48 (0x0030 hex), but persian zero 0 is code U + 06F0, so you have to enter numbers in proper unicode codes (different chars). Also your font have to support these codes (not all fonts support such numbers).
Persian numbers starts at unicode 0x06F0 (0, ۰) to 0x06F9 (9, ۹) while english numbers are 0x0030 (0) to 0x0039 (9).
How to enter these characters (in Windows)
If you do not have proper language support to enter these characters on your keyboard, you can enter them in Wordpad (standard application in Windows) or in Microsoft Word by entering four characters (hexa) of the code (f.e. 06F9) and pressing alt+x shortcut. four-character word will be converted to proper unicode character.

Related

What's the full name of "DBNum"?

In Excel, if the cell value is 123 and specify its custom formatting as [DBNum2][$-804]General then it will be displayed like 壹佰贰拾叁. (in Chinese,it's a local number format).
The question is :
What the DBNum mean? I think it's should be some word's short name. then what's the full name?
thx for your answer.
It is context which clarifies the name. Basically To display numbers using native number characters, use a [NatNum1], [NatNum2], ... [NatNum11] modifier at the beginning of a number format codes. DBnum is a native character modifier. DBNum is an identifier and has no expanded name. It is defined by usage
emphasized text"[DBNum2]" number type to convert numbers to Chinese uppercase.
Realize Chinese uppercase currency amount by using excel's [DBNum2] number type
Today's meeting budget needs to convert the final amount to Chinese uppercase numbers. I found that One can't find the relevant information in Excel help. We got a google look and conclude that we should use the "[DBNum2]" number type to convert numbers to Chinese uppercase.
Some common usages are as follows:
1. Set the custom format in the cell format:
Use the TEXT function to convert:
Source Link https://translate.google.com/translate?hl=en&sl=zh-CN&u=http://blog.zengrong.net/post/278.html&prev=search
By the way , EditGrid does not support [DBnum2]
EDIT :
Further related information
Displaying Numbers Using Native Characters
NatNum modifiers
To display numbers using native number characters, use a [NatNum1], [NatNum2], ... [NatNum11] modifier at the beginning of a number format codes.
The [NatNum1] modifier always uses a one to one character mapping to convert numbers to a string that matches the native number format code of the corresponding locale. The other modifiers produce different results if they are used with different locales. A locale can be the language and the territory for which the format code is defined, or a modifier such as [$-yyy] that follows the native number modifier. In this case, yyy is the hexadecimal MS-LCID that is also used in currency format codes. For example, to display a number using Japanese short Kanji characters in an English US locale, use the following number format code:
[NatNum0]
Try to convert any native number string to ASCII Arabic digits. If already ASCII, it remains ASCII.
**[NatNum1]**
Transliterations Native Number Characters DBNumX Date Format
Chinese Chinese lower case characters CAL: 1/7/7 [DBNum1]
Japanese short Kanji characters [DBNum1] CAL: 1/4/4 [DBNum1]
Korean Korean lower case characters [DBNum1] CAL: 1/7/7 [DBNum1]
Hebrew Hebrew characters
Arabic Arabic-Indic characters
Thai Thai characters
Hindi Indic-Devanagari characters
Odia Odia (Oriya) characters
Marathi Indic-Devanagari characters
Bengali Bengali characters
Punjabi Punjabi (Gurmukhi) characters
Gujarati Gujarati characters
Tamil Tamil characters
Telugu Telugu characters
Kannada Kannada characters
Malayalam Malayalam characters
Lao Lao characters
Tibetan Tibetan characters
Burmese Burmese (Myanmar) characters
Khmer Khmer (Cambodian) characters
Mongolian Mongolian characters
Nepali Indic-Devanagari characters
Dzongkha Tibetan characters
Farsi East Arabic-Indic characters
Church Slavic Cyrillic characters
[NatNum2]
Transliterations Native Number Characters DBNumX Date Format
Chinese Chinese upper case characters CAL 2/8/8 [DBNum2]
Japanese traditional Kanji characters CAL 2/5/5 [DBNum2]
Korean Korean upper case characters [DBNum2] CAL 2/8/8 [DBNum2]
Hebrew Hebrew numbering
[NatNum3]
Transliterations Native Number Characters DBNumX Date Format
Chinese fullwidth Arabic digits CAL: 3/3/3 [DBNum3]
Japanese fullwidth Arabic digits CAL: 3/3/3 [DBNum3]
Korean fullwidth Arabic digits [DBNum3] CAL: 3/3/3 [DBNum3]
Source Link : [Common/Number Format Codes][4]
Thanks, I have been looking for a description of [DBNUM1] (lower case Chinese number), [DBNUM2] (upper case Chinese number, for formal numbers) and [DBNUM3] (1-to-1 digit to Chinese number conversion), the last being obtained from somewhere else.
There is also another format code whose documentation needs to be found. An example is "[>100]#,000", which displays number in format indicated, but only if it is greater than 100. Not sure the rule of formatting if not meeting the condition. Not sure if you can specify multiple condition.
It is a pity that Microsoft does not give a complete list of format codes at a single place.
The actual meaning may only known by Microsoft Office developers. And we can only guess what the full name is.
The corresponding chapter introducing the equivalent function in LibreOffice and OpenOffice just use the name DBNum directly, without any further introduction, even the table of mapping in LibreOffice says "DBNumX".
Moreover, you can't find the definition of DBNum in Office Support.

Userform Input Small hyphen & Long hyphen? (✱Using symbols in Excel)

I am entering a string in a Userform in Excel-VBA from the user side of the form. I would want to know how to enter the Long Hyphen.
The Small Hyphen would be Shift + - the (the minus sign button next to 0).
How would you enter the Long Hyphen on the form as I am doing a string match in my VBA code on the back-end? It can be entered with Alt+0150, but is there another simpler way?
If the option of entering the Long Hyphen doesn't work then I will handle this value on the back-end through a find and replace method or something in VBA.
👆 There is only one "Hyphen"...    It's part of a ᖴᗩᗰᎥᒪƳ ᴏғ ᑕᕼᗩᖇᗩᑕ丅ᗴᖇᔕ called Dashes.
Examples:
Hyphen [-] (-)
Minus sign [−] (−)
En dash [–] (–)
Em dash [—] (—)
✱ Your browser might render them differently, but the fonts above are supposed to be [Consolas or Courier 13px] and (Arial or Helvetica 15px). While they all kind of look the same in this font, those are four different characters.
The characters can be copy/pasted directly from here - − – — into Excel (but not to the the VBA Editor), or can be produced along with 136,686 other Unicode characters, either:
with a worksheet formula, using the ᴜɴɪᴄʜᴀʀ function:
=UNICHAR(9733) 'produces a [★] star character.
programmatically with VBA, using the ChrW function:
Range("A1") = ChrW(9743) 'puts a wee [☏] rotary phone in cell A1.
More about dashes —
What they are
How to use them
"Stealing" Unicode characters from websites
There are all sorts of handy Unicode symbols — so many that it can be hard to find "just" the right one.
However you can (and will!) find other Unicode symbols on web pages that you want to use programmatically. All you need is the symbol's code, which can be determined easily:
Copy/paste the symbol from your browser (being careful to copy only the single character; no spaces, etc.) into a cell in Excel
then, go to VBA's Immediate Window ( AltF11→CtrlG ), type:
MsgBox AscW([a1])
...(Where A1 is the cell with the character). Hit Enter, and the character's Unicode code will display.
You could also use Windows' built-in Character Map utility, or one of many third-party browser plug-ins. You can even paste a symbol directly into Google to learn more about it:
Finally, no discussion on the topic of Unicode would be complete without links to:
  👉  The Unicode Consortium (unicode.org) and,
  👉  “ȶɦɛ 𝓒𝓸𝓸𝓵 𝕱𝖆𝖓𝖈𝖞 Ⓣⓔⓧⓣ 𝔾𝕖𝕟𝕖𝕣𝕒𝕥𝕠𝕣”  (Yes, those are all plain text characters.)
...and if you're looking for a unique gift, or just want your name to go down in history for something that really matters, you can even adopt a Unicode character, starting at $100 ᴜsᴅ!
Special thanks to Vinton Cerf for adopting the Unicode Leonard Nimoy's "Live Long and Prosper" symbol.
                               🖖

Add superscript in Sublime Text

I inherited a line of code with the following type of superscript:
nm³
I cannot seem to change - or replicate - the 3 superscript. This particular 3 superscript seems distinct from that which I can create in Text Edit.app, or Microsoft Word (i.e., 3), because when I paste the superscript I create in one of those into Sublime Text, the superscript is not retained (i.e., it looks just like this: nm3).
In particular, I'd like to change it to 2. Is there a way to do this with Sublime Text, another text editor, or through a different approach? Why is this superscript different?
One possibility is that the character that you have is the UNICODE “Superscript three” ³ character (code U+0083, in the UTF-8 encoding the couple of bytes C2 B3). In this case you can substitute it with the “Superscript two” ² character (code U+0082, in the UTF-8 encoding the couple of bytes C2 B2).
If this is the case, you can copy and paste any of these characters: ¹²³⁴⁵⁶⁷⁸⁹⁰.

How do I properly display Korean text with TextOut?

I am compiling with the UNICODE directive, so all CStrings are in Unicode. If I place "봉재" into a CString, select a font with "Arial", then use TextOut or TextOutW to display this text, two boxes are displayed.
If I add Latin characters to the text, e.g. "봉재 ABC", then the display becomes two boxes followed by " ABC".
However if I add certain other CJKV characters to the text, e.g. "봉재 /元", the then display shows the text of my CString.
I am guessing that TextOut examines the text, and if certain characters are found, it substitutes fonts for the best display. If my theory is correct, then by adding certain oriental characters to a string, I can force TextOut to substitute a Unicode font, but if I add other oriental characters, TextOut does not substitute the correct font, and the display is inadequate.
How can I get TextOut to always substitute the correct font, or to otherwise display text consistently?
Note that "Arial" doesn't support CJKV at all, it's just a Latin font. If you want wider Unicode support while maintaining the look of the Arial typeface, use "Arial Unicode". Otherwise, use another font for which you first check that it contains all the glyphs you need rendered.

What's the difference in one word token and mulit-word token in crf++ for Chinese?

I use crf++ for Chinese named entity recognition.The first column in train file is token represent current word.I see someone use only one Chinese character in first column but someone use many Chinese characters like 中国。
Chinese word could be 1 Chinese character or multiply Chinese characters:
中 represents a English word - middle.
国 represents another English word - country.
and 中国 represents English word - China.
they are same - current word - just like 'CHINA' has 5 English characters, 中国 has 2 Chinese characters - both are current word in cft++.

Resources