Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to pars non-ascii (e.g Korean) strings?

I am trying to convert strings into a character list of Unicode values. For
example,

"NULL" converts to " 0x004E, 0x0055, 0x004C, 0x004C, 0 "

I have this working fine for ASCII strings (see below) but need to do the
same for Asian languages. How can I do this for all languages?

Thanks,

Douglas Gennetten

---

I created the following function to do this conversion by pulling out one
character at a time from the string and doing an operation on that character
to get the ascii equivalent.



Function HEXEDASCII(asciiString As String) As String
Const COMMA As String = ","
Dim i As Long
Dim sOut As String
For i = 1 To Len(asciiString)

If ((i - 1) Mod 8 = 0) Then sOut = sOut & vbCrLf & " "
sOut = sOut & "0x" & _
Right("0000" & Hex(Asc(Mid(asciiString, i, 1))), 4) _

& COMMA & " "
Next i
HEXEDASCII = sOut & "0" & vbCrLf

End Function






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to pars non-ascii (e.g Korean) strings? -- Double-Byte Equivalents to Ascii Functions????

make that "parse" :-|

What are the double-byte equivalents of these ascii functions?


---

I created the following function to do this conversion by pulling out one
character at a time from the string and doing an operation on that

character
to get the ascii equivalent.



Function HEXEDASCII(asciiString As String) As String
Const COMMA As String = ","
Dim i As Long
Dim sOut As String
For i = 1 To Len(asciiString)

If ((i - 1) Mod 8 = 0) Then sOut = sOut & vbCrLf & " "
sOut = sOut & "0x" & _
Right("0000" & Hex(Asc(Mid(asciiString, i, 1))), 4) _

& COMMA & " "
Next i
HEXEDASCII = sOut & "0" & vbCrLf

End Function








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find and replace numeric strings in larger text strings Mr Molio Excel Worksheet Functions 8 November 9th 11 05:17 PM
Download SAP japanese/korean tables to EXCEL Andrew Excel Discussion (Misc queries) 0 March 11th 09 04:07 PM
Can excel support english and korean text in the same spread shee. preston122970 Excel Discussion (Misc queries) 0 June 30th 08 05:19 PM
Prompt for Korean proofread Mats Samson Excel Discussion (Misc queries) 0 November 15th 07 08:01 PM
How do I pars in excel kfe80598 Excel Discussion (Misc queries) 2 September 21st 05 09:43 PM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"