Unicode -> ASCII
mpullin
Posts: 949
Anyone written a Unicode to ASCII function? I'm thinking of writing one myself, because I need to store something a module sends my touchpanel in a variable, but it's being sent to the touchpanel in a ^UNI- command. e.g.
Line 3 :: Command To [33033:1:1]-[^UNI-116,0,005200450050004500410054007C0041004C004C] - 11:54:16Basically I am going to read 4 characters at a time and use hextoi followed by type_cast to get a character, and add it to my string. But there is probably a better way.
0
Comments
_WC
CH_TO_WC
WC_COMPARE_STRING
WC_CONCAT_STRING
WC_DECODE
WC_ENCODE
WC_FILE_CLOSE
WC_FILE_OPEN
WC_FILE_READ
WC_FILE_READ_LINE
WC_FILE_WRITE
WC_FILE_WRITE_LINE
WC_FIND_STRING
WC_GET_BUFFER_CHAR
WC_GET_BUFFER_STRING
WC_LEFT_STRING
WC_LENGTH_STRING
WC_LOWER_STRING
WC_MAX_LENGTH_STRING
WC_MID_STRING
WC_REMOVE_STRING
WC_RIGHT_STRING
WC_SET_LENGTH_STRING
WC_TO_CH
WC_TP_ENCODE
WC_UPPER_STRING
Maybe one of the above may be of some help?
Oh... you have to #INCLUDE 'UnicodeLib.axi'
This code just gets me a bunch of question marks... I'm starting to get frustrated with this Unicode thing