2013-10-07 215 views

回答

0

由於去所有幫助:How to convert Unicode characters to ANSI using AutoIt?

這是解決方案:

#include <WinAPI.au3> 

Local $str = "My name is \u0393\u03A1\u0397" 
Local $utfStr = Execute("'" & StringRegExpReplace($str, "(\\u([[:xdigit:]]{4}))","' & ChrW(0x$2) & '") & "'") 
Local $ansiStr = _WinAPI_WideCharToMultiByte($utfStr) 
MsgBox(64,"Unicode2Ansi", $utfStr & @CRLF & $ansiStr) 

Exit 
相關問題