Getting ASCII value for Characters?
-
Need Convert character to ascii value. For character "‚" ascii value is 130 but I got 8218. string is "õí‚è‹". for (int i = 0; i < rtfSource.Text.Length; i++) { rtfSource.Select(i, 1); strTemp = rtfSource.SelectedText.ToString(); strChar = strTemp.Substring(0, 1); iCode = (int)strChar[0]; }
Have A Nice Day! Murali.M Blog
-
Need Convert character to ascii value. For character "‚" ascii value is 130 but I got 8218. string is "õí‚è‹". for (int i = 0; i < rtfSource.Text.Length; i++) { rtfSource.Select(i, 1); strTemp = rtfSource.SelectedText.ToString(); strChar = strTemp.Substring(0, 1); iCode = (int)strChar[0]; }
Have A Nice Day! Murali.M Blog
What you have is not an ASCII coded character, and it is not a "comma;" it is Unicode, specifically the single low-9 quotation mark: [^]. So, if you must work with Unicode character sets, you should plan to forget about using plain-old ASCII. There are over 100k Unicode characters, and only 128 in ASCII. While you can access an ASCII "mapping" via the Encoding Class:
byte[] unicode = Encoding.Unicode.GetBytes("õí‚è‹");
string Ascii = Encoding.ASCII.GetString(unicode);
The result of this would be: "?\0?\0 ?\09" : the "?" indicates result is unknown for a given character.
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
-
Need Convert character to ascii value. For character "‚" ascii value is 130 but I got 8218. string is "õí‚è‹". for (int i = 0; i < rtfSource.Text.Length; i++) { rtfSource.Select(i, 1); strTemp = rtfSource.SelectedText.ToString(); strChar = strTemp.Substring(0, 1); iCode = (int)strChar[0]; }
Have A Nice Day! Murali.M Blog
-
What you have is not an ASCII coded character, and it is not a "comma;" it is Unicode, specifically the single low-9 quotation mark: [^]. So, if you must work with Unicode character sets, you should plan to forget about using plain-old ASCII. There are over 100k Unicode characters, and only 128 in ASCII. While you can access an ASCII "mapping" via the Encoding Class:
byte[] unicode = Encoding.Unicode.GetBytes("õí‚è‹");
string Ascii = Encoding.ASCII.GetString(unicode);
The result of this would be: "?\0?\0 ?\09" : the "?" indicates result is unknown for a given character.
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
its not comma, and ttf font not Unicode font. Alt+0130 is it value. How can I get the ascii value 130. third character in the string.
Have A Nice Day! Murali.M Blog
-
its not comma, and ttf font not Unicode font. Alt+0130 is it value. How can I get the ascii value 130. third character in the string.
Have A Nice Day! Murali.M Blog
Alt+130 would be é not è (which you wrote in your question). è would be Alt+138. But those are both not ASCII since ASCII has only 128 Symbols. So what exactly do you want to do? Convert the third character (which would be ",") or the è ?
-
Alt+130 would be é not è (which you wrote in your question). è would be Alt+138. But those are both not ASCII since ASCII has only 128 Symbols. So what exactly do you want to do? Convert the third character (which would be ",") or the è ?
I want to mapping characters by based on ASCII Value.
Have A Nice Day! Murali.M Blog
-
its not comma, and ttf font not Unicode font. Alt+0130 is it value. How can I get the ascii value 130. third character in the string.
Have A Nice Day! Murali.M Blog
Unicode isn't a font - it's a character set which can be displayed on a suitable context using a font to "describe" the exact shape to be drawn for each character. ASCII is a different (and much smaller, more limited) character set - which can also be displayed using a font, but the number of different shapes that can be drawn is far fewer. Fonts are things like Arial, Times New Roman, Verdana, Wingdings - they are ways to display the same character from a character set differently. And the third character in the string "õí‚è‹" is ','. The character at index 3 is 'è' which exists in the Extended ASCII character set (which has 256 characters) but doesn't exist in the standard 128 character ASCII set.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
I want to mapping characters by based on ASCII Value.
Have A Nice Day! Murali.M Blog