![]() |
![]() |
||||||
|
|||||||
| Tags: hexadecimal, utf8 |
![]() |
|
|||
|
I have a online form which require user to input text (which may contains asian
language). the charset of the application is utf-8 How could we convert the received text into their hexadecimal values? pls kindly advise |
| Sponsored Links |
|
|||
|
<cfif structKeyExists(form,"asian_string")>
<cfset strLen = len(form['asian_string'])> <cfset hex = arrayNew(1)> <cfloop from="1" to="#strLen#" index="i"> <cfset current_char = mid(form['asian_string'],i,1)> <cfset arrayAppend(hex,formatBaseN(asc(current_char),16)) > </cfloop> <cfdump var="#hex#"> </cfif> <form action="" method="post"> <input type="text" name="asian_string" /> <input type="submit" /> </form> |
|
|||
|
|
|
|||
|
I have tried hexToString function but does not display characters correctly.
For example, I used the code from cf.marc to convert an Asian character to hex (value is 4e2d). After using hexToString, the character is not correctly. Pls kindly advise. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise