最新消息:

Unicode是NSIS支持utf8和utf16和ansi之间编码转换的插件

nsis 永恒心锁 2702浏览 0评论
/*
Unicode是NSIS支持utf8和utf16和ansi之间编码转换的插件
在NSIS中对字符处理的能力较弱,Unicode插件为NSIS处理字符串编码转换做出了改进.
*/
!AddPluginDir "../Plugins"
Name "UnicodeTest"
OutFile "UnicodeTest.exe"
ShowInstDetails show
Section
#Convert file from Unicode to ANSI
StrCpy $0 "UTF-8.txt"
StrCpy $1 "_ResultANSI_.txt"
StrCpy $2 AUTO
unicode::FileUnicode2Ansi "$0" "$1" $2
Pop $3
DetailPrint 'unicode::FileUnicode2Ansi "$0" "$1" $2'
DetailPrint "$3"
DetailPrint ""
#Convert file from ANSI to Unicode
StrCpy $0 "ANSI.txt"
StrCpy $1 "_ResultUnicode_.txt"
StrCpy $2 UTF-16LE
unicode::FileAnsi2Unicode "$0" "$1" $2
Pop $3
DetailPrint 'unicode::FileAnsi2Unicode "$0" "$1" $2'
DetailPrint "$3"
DetailPrint ""
#Get file unicode type
StrCpy $0 "UTF-16BE.txt"
unicode::UnicodeType "$0"
Pop $1
DetailPrint 'unicode::UnicodeType "$0"'
DetailPrint "$1"
DetailPrint ""
SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » Unicode是NSIS支持utf8和utf16和ansi之间编码转换的插件

您必须 登录 才能发表评论!