>>>>>>>data =chr (227) >>>>>>>utf16 =Strconv(m.data , 5, 1256, 1) >>>>>>>>>>>>>>
>>>>>>>hex = strconv(utf16, 15) >>>>>>>?hex && 4506 >>>>>>>>>>>>>
>>>utf16 =Strconv(m.data , 5) >>>>>>
>local s, utf16 >s = chr (227) > >if( !StringToUTF16(@m.utf16, m.s, 1256) ) > && problem >endif >>
>*_______________________________________________________________________________ >#define CP_ACP 0 >#define CP_MACCP 2 >#define CP_OEMCP 1 >#define CP_SYMBOL 42 >#define CP_THREAD_ACP 3 >#define CP_UTF7 65000 >#define CP_UTF8 65001 >#define MB_PRECOMPOSED 0x1 >#define MB_COMPOSITE 0x2 >#define MB_USEGLYPHCHARS 0x4 >#define MB_ERR_INVALID_CHARS 0x8 > >#define WC_DEFAULTCHAR 0x00000040 >#define WC_ERR_INVALID_CHARS 0x00000080 >#define WC_NO_BEST_FIT_CHARS 0x00000400 >*_______________________________________________________________________________ >function StringToUTF16(utf16Out, stringIn, codepageIn) > > local success > success = true > > do case > case !m.success > > case empty(len(m.stringIn)) > utf16Out = '' > > otherwise > local lpWideCharStr, result > lpWideCharStr = space(len(m.stringIn)*2) > > result = MultiByteToWideChar( ; > evl(m.codepageIn, cpcurrent()), ; > MB_ERR_INVALID_CHARS, ; > @m.stringIn, ; > len(m.stringIn), ; > @m.lpWideCharStr, ; > len(m.lpWideCharStr) ; > ) > > do case > case !m.success > > case empty(m.result) > assert false > success = false > > otherwise > utf16Out = left(m.lpWideCharStr, m.result * 2) > > endcase > > endcase > > return m.success > > >endfunc >*_______________________________________________________________________________ > > >function MultiByteToWideChar > lparameters codepage, ; > dwFlags, ; > lpMultiByteStr, ; > cbMultiByte, ; > lpWideCharStr, ; > cchWideChar > > local success > success = true > > local result > > do case > case !m.success > > otherwise > try > declare integer MultiByteToWideChar in Kernel32.dll ; > long codepage, ; > long dwFlags, ; > string@ lpMultiByteStr, ; > integer cbMultiByte, ; > string@ lpWideCharStr, ; > integer cchWideChar > > result = MultiByteToWideChar( ; > m.codepage, ; > m.dwFlags, ; > @m.lpMultiByteStr, ; > m.cbMultiByte, ; > @m.lpWideCharStr, ; > m.cchWideChar ; > ) > catch > assert false > success = false > > endtry > endcase > > return iif(m.success, m.result, 0) > >endfunc >*_______________________________________________________________________________ >excuse me. but it is not my desire.
* CHR(227) = “م” IN HEX=E3 ? ChrUTF16HEX(CHR(227)) && Return 0645ChrUTF16HEX is an example function name :)