--- In [email protected], "mockey_a" <[EMAIL PROTECTED]> wrote:
>
> UTF-8 is actually the thing that interests me about unicode. It is
> ASCII-compatible. Here's a page that probably explains it better
> than I could:
> http://www.personal.uni-jena.de/~pfk/mpp/sv8/utf8.html
> There is also a windows API function shown which seems to do what I
> need: Convert a locale string to UTF-8.
Why don't you just use dll plugin then? Here is a sample script:
----------------------- UTF8.PowerPro ---------------------------------
local sString,xString,uString,iwNum,iuNum
sString="string_to_be_converted"
iwNum=dll.call("MultiByteToWideChar|ui ui s i x i",;;+
0,0,"sString",-1,"xString",0)
xString=repeat(" ",iwNum*2) ;; needed when sString is long
dll.call("MultiByteToWideChar|ui ui s i x i",;;+
0,0,"sString",-1,"xString",iwNum)
iuNum=dll.call("WideCharToMultiByte|ui ui x i s i ui ui",;;+
65001,0,"xString",-1,"uString",0,0,0)
uString=repeat(" ",iuNum) ;; needed when sString is long
dll.call("WideCharToMultiByte|ui ui x i s i ui ui",;;+
65001,0,"xString",-1,"uString",iuNum,0,0)
file.writeall(pprofolder++"output.txt",uString)
quit
-----------------------------------------------------------------------
Sean
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/