Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Visual Studio 2005 on Japanese

Name: Anonymous 2010-02-27 6:24

Does anyone know how I can express inputted japanese character-numbers, (1234567890) as normal integer values (1234567890)

if im writing an application for a japanese user and they enter on the form in a textbox "7", in the japanese font, how can i convert this as intger 7?

if i get the textbox.text value, it doesnt convert to an intger, even the char datatype doesnt like it.

Name: Anonymous 2010-02-27 6:49

someone must know the answer!

Name: Anonymous 2010-02-27 7:00

Use some Unicode library.

Name: Anonymous 2010-02-27 7:13

>>3
ABSOLUTELY GENIUS!

Name: Anonymous 2010-02-27 7:24

>>3


thats not really answering my question, just restating it.

Name: Anonymous 2010-02-27 7:43

FIND OUT UNICODE VALUES FOR THEM. I ASSUME THEY ARE IN SEQUENCE.
MUCH IN THE SAME AS FINDING THE INTEGER VALUE OF AN ASCII NUMERICAL DIGIT (IE char c = '7'; int i = c - '0'; )

Name: Anonymous 2010-02-27 8:00

They start at U+FF10.

Name: Anonymous 2010-02-27 8:02

>>6
thats just repeating what you learned in the first pages of K&R, a book that every programmer should read and im too ignorant to read "books"
doesnt answer my question

here let me make some more posts without punctuation and eventually post some code without code tags

Name: Anonymous 2010-02-27 8:07

>>8
HAY I DIDNT READ K&R EXPERT PROGRAMMERS HAVE AN INSTINCTIVE KNOWLEDGE OF PROGRAMMING

Name: Anonymous 2010-02-27 8:08

Hashtables fucker...

Name: Anonymous 2010-02-27 8:08

>>6


thank you

i ended up using

Function AsciiEncode(ByVal value As String) As String
Dim encValue As New System.Text.StringBuilder(value.Length * 6)
Dim c As Char
' encode each char to its ASCII representation
For Each c In value
encValue.Append("&#")
encValue.Append(Convert.ToInt32(c))
encValue.Append(";")
Next
Return encValue.ToString()
End Function

its not perfect, but it will work :)

Name: Anonymous 2010-02-27 8:11

I was hoping there was a way around finding the unicode value of the text and using that when a textbox was changed, since vb.net has loads of features hidden away... perhaps someone had allready had this problem and solved it without conversion code or lookup tables

Name: Anonymous 2010-02-27 8:21

>>11
See? Told you. No code tags.

Name: Anonymous 2010-02-27 8:24

>>13


I dont understand what you are getting at

Name: Anonymous 2010-02-27 8:30

>>14
What are you, fourteen? Don't you have any sense of aesthetics? Or are you FrozenVoid?

Name: Anonymous 2010-02-27 8:31

>>13


Theres no need to be an elitist bastard if I ask a question you may have a solution for. I was hoping there would be a away to do what i wanted without resorting to unicode char conversion every time the the keyboard was pressed. I hope your happy you made me cry. fuck you.

Name: Anonymous 2010-02-27 8:41

>>16
I hope your happy you made me cry.
I'm not >>13, but that did give me a warm fuzzy feeling in the depths of my heart.

Name: Anonymous 2010-02-27 9:16

>>13
Actually you were referring to me (6-kun) when you said about no code tags, so you can't then say you were applying it to OP

Name: Anonymous 2010-02-27 9:26

Is the input done in Unicode form or SJIS? Just use whatever API is appropriate to convert to Unicode if it's SJIS and then write your own atoi routine which supports Japanese 0-9 characters, it should be rather easy (get the charcode of 0, and handle it like you would with normal ASCII characters, except sizeof(wchar_t) is 2, not 1).

Name: Anonymous 2010-02-27 11:26

>>19
Just use GetNumericValue.

Name: Anonymous 2011-09-25 14:09

pantsu

Don't change these.
Name: Email:
Entire Thread Thread List