\uxxxx 转换为中文 及 反向转换

许多实用脚本和封装函数, 可以让您编写脚本更加便捷高效

Moderators: tmplinshi, arcticir

linpinger
Posts: 13
Joined: 29 Dec 2013, 22:51
GitHub: linpinger

\uxxxx 转换为中文 及 反向转换

06 Jul 2014, 21:18

缘起: 网页尤其json中有这种escape过的中文,需要还原成中文,不知道论坛中是否有发过相同功能的脚本

功能: 将 "\u7231\u5c14\u5170\u4e4b\u72d0" 这样的字符串转换为 "爱尔兰之狐",写得粗糙,欢迎拍砖

集结: 一开始只是分享一下准备自己用的脚本,没想引出两位大牛,经过改进及简单测试,选出在L版下速度最快的两种函数

"\u7231\u5c14\u5170\u4e4b\u72d0" -> "爱尔兰之狐"

Code: Select all

msgbox, % uXXXX2CN("\u7231\u5c14\u5170\u4e4b\u72d0")
return

uXXXX2CN(uXXXX) ; in: "\u7231\u5c14\u5170\u4e4b\u72d0"  out: "爱尔兰之狐"
{	; by RobertL
	Loop, Parse, uXXXX, u, \
		retStr .= Chr("0x" . A_LoopField) ;为字符串添加16进制前缀。字符=Chr(编码)。
	return retStr
}
"爱尔兰之狐" -> "\u7231\u5c14\u5170\u4e4b\u72d0"

Code: Select all

msgbox, % CN2uXXXX("爱尔兰之狐" )
return

CN2uXXXX(cnStr) ; in: "爱尔兰之狐" out: "\u7231\u5C14\u5170\u4E4B\u72D0"
{ ; from tmplinshi
	OldFormat := A_FormatInteger
	SetFormat, Integer, Hex
	Loop, Parse, cnStr
		out .= "\u" . SubStr( Asc(A_LoopField), 3 )
	SetFormat, Integer, %OldFormat%
	Return out
}

下面是最开始的版本,只有uXXXX到文本,效率不高,唯一优点就是可以适用于原版,L/H版

Code: Select all

#noenv

	xxxx := "\u7231\u5c14\u5170\u4e4b\u72d0"
	sTime := A_TickCount
	xx := uXXXX2CN(xxxx)
	eTime := A_TickCount - sTime
	msgbox, 耗时: %eTime% ms`n%xx%

return

uXXXX2CN(uXXXX) ; in: "\u7231\u5c14\u5170\u4e4b\u72d0"  out: "爱尔兰之狐"
{
	StringReplace, uXXXX, uXXXX, \u, #, A
	cCount := StrLen(uXXXX) / 5
	VarSetCapacity(UUU, cCount * 2, 0)
	cCount := 0
	loop, parse, uXXXX, #
	{
		if ( "" = A_LoopField )
			continue
		NumPut("0x" . A_LoopField, &UUU+0, cCount)
		cCount += 2
	}
	if ( A_IsUnicode ) {
		return, UUU
	} else {
		Unicode2Ansi(UUU, rUUU, 0)
		return, rUUU
	}
}

Unicode2Ansi(ByRef wString, ByRef sString, CP = 0)  ; 这个函数是从论坛上抄下来的
{
	nSize := DllCall("WideCharToMultiByte", "Uint", CP, "Uint", 0, "Uint", &wString, "int",  -1, "Uint", 0, "int", 0, "Uint", 0, "Uint", 0) 
	VarSetCapacity(sString, nSize)
	DllCall("WideCharToMultiByte", "Uint", CP, "Uint", 0, "Uint", &wString, "int",  -1, "str",  sString, "int",  nSize, "Uint", 0, "Uint", 0)
}
Last edited by linpinger on 08 Jul 2014, 21:45, edited 4 times in total.
User avatar
RobertL
Posts: 540
Joined: 18 Jan 2014, 01:14
Location: China

谢谢分享,总结,进步。

07 Jul 2014, 05:02

Code: Select all

s:= A_TickCount
i:="\u7231\u5c14\u5170\u4e4b\u72d0"
;Loop Parse, %i%, u,\	;AHK V2写法
Loop Parse, i, u,\	;AHK V1写法
	o.=Chr("0x" A_LoopField)	;为字符串添加16进制前缀。字符=Chr(编码)。
e:= A_TickCount - s
MsgBox 耗时: %e% ms`n%o%
参见:AHK8.Wiki:字符、编码,转换
我不大懂你代码中的函数、用法.. :roll:

边学/边用,慢慢总结~没事回论坛转转~
我为人人,人人为己?
linpinger
Posts: 13
Joined: 29 Dec 2013, 22:51
GitHub: linpinger

Re: 谢谢分享,总结,进步。

07 Jul 2014, 20:01

哇,很酷的写法,相当简洁,赞一个

根据你的写成了两个函数,一个适用于L/H版,一个适用于原版

循环了100,0000次,下面是几个版本的时间:
  • Unicode_uXXXX2CN() : 22079 ms
    Ansi_uXXXX2CN() : 84313 ms
    uXXXX2CN() L版 : 134360 ms
    uXXXX2CN() 原版 : 248782 ms

适用于L/H版:

Code: Select all

Unicode_uXXXX2CN(uXXXX)
{	; by RobertL
	Loop, Parse, uXXXX, u, \
		retStr .= Chr("0x" . A_LoopField) ;为字符串添加16进制前缀。字符=Chr(编码)。
	return retStr
}
适用于原版:

Code: Select all

Ansi_uXXXX2CN(uXXXX)
{
	Loop, Parse, uXXXX, u, \  ;AHK V1写法
	{
		if ( A_loopfield = "" )
			continue
		stringsplit, xx_, A_loopfield
		o .= Chr("0x" . xx_3 . xx_4) . chr("0x" . xx_1 . xx_2)
	}
 	Unicode2Ansi(o, retStr,  0)
	return, retStr
}
RobertL wrote:

Code: Select all

s:= A_TickCount
i:="\u7231\u5c14\u5170\u4e4b\u72d0"
;Loop Parse, %i%, u,\	;AHK V2写法
Loop Parse, i, u,\	;AHK V1写法
	o.=Chr("0x" A_LoopField)	;为字符串添加16进制前缀。字符=Chr(编码)。
e:= A_TickCount - s
MsgBox 耗时: %e% ms`n%o%
参见:AHK8.Wiki:字符、编码,转换
我不大懂你代码中的函数、用法.. :roll:

边学/边用,慢慢总结~没事回论坛转转~
linpinger
Posts: 13
Joined: 29 Dec 2013, 22:51
GitHub: linpinger

Re: \uxxxx 转换为中文

08 Jul 2014, 02:17

找到了一个反向的将 中文转为 \uXXXX形式的函数

该函数摘自:https://github.com/cocobelgica/AutoHotkey-JSON

这种写法太牛,没看懂,不过不妨拿过来用:

Code: Select all

#noenv
    msgbox, % CN2uXXXX("爱尔兰之狐")
return
CN2uXXXX(cnStr) ; in: "爱尔兰之狐" out: "\u7231\u5C14\u5170\u4E4B\u72D0"
{	; by https://github.com/cocobelgica/AutoHotkey-JSON
	while RegExMatch(cnStr, "[^\x20-\x7e]", ch) {
		ustr := Asc(ch), esc_ch := "\u", n := 12
		while (n >= 0)
			esc_ch .= Chr((x:=(ustr>>n) & 15) + (x<10 ? 48 : 55))
			, n -= 4
		StringReplace, cnStr, cnStr, % ch, % esc_ch, A
	}
	return, cnStr
}
User avatar
RobertL
Posts: 540
Joined: 18 Jan 2014, 01:14
Location: China

Re: \uxxxx 转换为中文

08 Jul 2014, 05:51

以下部分转AHK8相应帖子,不再更新以下部分。

  • 概要解释:
    通过函数Asc返回字符编码(默认,十进制)→将编码由十进制数值转换至十六进制字符的编码→通过函数Chr将十六进制字符的编码转换为十六进制字符
  • 完整解释:

    Code: Select all

    while RegExMatch(cnStr, "[^\x20-\x7e]", ch) {	;查找所有非Ascii表中可打印的字符(即,所有需要转换的字符),并存储于ch。
    	ustr := Asc(ch), esc_ch := "\u", n := 12
    		;字符串中第一个字符的(基于当前AHK编码(ANSI或Unicode,当前为Unicode)的)编码=Asc(字符串),编码是数值,默认是十进制(以下我用的十六进制表示)
    		;esc_ch:固定的编码的前缀
    		;n:每个编码为4位十六进制数(如'尔'对应的Unicode编码'5C14')(可换算成十进制数,默认是十进制);每个十六进制数为4位二进制数(如十六进制数'C'对应的二进制数'1100');每次通过移位操作(以下的'>>')取出一个十六进制数(即4位二进制数);移位操作的移位量为二进制(即移位一个十六进制数,需移位4个二进制单位)。
    		;对十六进制,需移位4次(实际是3次,最后一次移位量为0),故n=3*4=12
    	while (n >= 0)	;n分别为12、8、4、0,共4次
    		esc_ch .= Chr((x:=(ustr>>n) & 15) + (x<10 ? 48 : 55))
    			;x:=(ustr>>n) & 15:移位一个十六进制数,x为结果,'5C14'分别为'5'、'C'、'1'、'4'。
    			;48D(十进制)-0x30(十六进制)-Ascii表中的字符'0',55D-0x37-'7'。
    			;十进制下x<10,数值x对应十六进制字符0-9;x>=10(x<=15),数值x对应字符十六进制字符A-F。
    			;x=0时,字符0的Ascii编码为以上的48D;x=9时,字符9的Ascii编码为48+9;x=10时,字符A的Ascii编码为65(以上的55+10);x=15时,字符F的Ascii编码为70(以上的55+15)。
    		, n -= 4
    	StringReplace, cnStr, cnStr, % ch, % esc_ch, A
    }
作者玩了个技巧,但是绕了个大弯。
简单的方式:
  • 十进制数值转换为十六进制数值,可以通过构造转换表,查表得到(快不少)。
    (而不用,当数值<10时,对应的十六进制字符的编码=数值+48;当数值>=10时,对应十六进制字符的编码=数值+55)
    测试代码:

    Code: Select all

    t:={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"}
    b:=A_TickCount
    Loop 1000000{
    	y:=""
    	Loop 0x10
    		y.= Chr((x:=A_Index-1) + (x<10 ? 48 : 55))	;24875
    		;~ y.=t[A_Index-1]	;14281
    }
    MsgBox % A_TickCount-b
  • 或,通过SetFormat,设置数值的默认格式为十六进制,则将存储函数Asc的结果的数值变量(如,0x1AB2)作为字符串变量(如,"0x1AB2"),并替换"0x"为"\u"即可(如,"\u1AB2")。
比较啰嗦,慢慢精简到Wiki,
一开始我也没看懂,谢谢分享!(另外,你是怎么从那一堆代码中找到自己想要的 :o
我去提交下他那开源项目。[/color]
Last edited by RobertL on 08 Jul 2014, 09:36, edited 1 time in total.
我为人人,人人为己?
tmplinshi
Posts: 1557
Joined: 01 Oct 2013, 14:57

Re: \uxxxx 转换为中文

08 Jul 2014, 09:18

我也经常需要把 \uxxxx 转换为中文。

Code: Select all

; http://www.autohotkey.com/board/topic/63263-unicode-escaped-string-convert-u00/?p=398749

MsgBox % JavaEscapedToUnicode("\u7231\u5c14\u5170\u4e4b\u72d0")

JavaEscapedToUnicode(s) {
	i := 1
	while j := RegExMatch(s, "\\u[A-Fa-f0-9]{1,4}", m, i)
		e .= SubStr(s, i, j-i) Chr("0x" SubStr(m, 3)), i := j + StrLen(m)
	return e . SubStr(s, i)
}

; For AutoHotkey Basic and AutoHotkey_L ANSI, note that anything higher than \u007F may be incorrect if your system code page is not 1252 (i.e. US English).

Code: Select all

MsgBox % str2u("测试")

str2u(str)
{
	OldFormat := A_FormatInteger
	SetFormat, Integer, Hex

	Loop, Parse, str
		out .= "\u" SubStr( Asc(A_LoopField), 3 )

	SetFormat, Integer, %OldFormat%
	Return out
}
User avatar
RobertL
Posts: 540
Joined: 18 Jan 2014, 01:14
Location: China

Re: \uxxxx 转换为中文

08 Jul 2014, 09:42

tmplinshi wrote:我也经常需要把 \uxxxx 转换为中文。
我去!我以为是爱尔兰之狐!原来是临时!代码果然优雅 :mrgreen:
还看不懂JavaEscapedToUnicode中的,回头分析。
空了多在论坛分享、讨论,AHK8也是~
我为人人,人人为己?
tmplinshi
Posts: 1557
Joined: 01 Oct 2013, 14:57

Re: \uxxxx 转换为中文

08 Jul 2014, 09:52

str2u 函数名是我写的,函数内容我忘记是在哪看到的了 :lol:
User avatar
RobertL
Posts: 540
Joined: 18 Jan 2014, 01:14
Location: China

Re: \uxxxx 转换为中文

08 Jul 2014, 19:17

tmplinshi wrote:str2u 函数名是我写的,函数内容我忘记是在哪看到的了 :lol:
上面帖子讨论出的结果正好包含这个写法,看来我们又重新实践了遍 :lol:
我为人人,人人为己?
linpinger
Posts: 13
Joined: 29 Dec 2013, 22:51
GitHub: linpinger

Re: \uxxxx 转换为中文 及 反向转换

08 Jul 2014, 21:42

总结了一下你俩的脚本

发现本来被我写得超复杂的脚本,最后效率最高的反而是你俩写的超简单又好理解的脚本

这难道是传说中的大道至简咩

已将最快的两个提取到一楼,从 RobertL和tmplinshi 你俩的脚本中各抄了一个
User avatar
RobertL
Posts: 540
Joined: 18 Jan 2014, 01:14
Location: China

Re: \uxxxx 转换为中文 及 反向转换

08 Jul 2014, 23:05

嗯,从讨论中学习,总结。
我也收下了..回头再整理下(至AHK.Wiki——大家的知识笔记)..
我为人人,人人为己?
cixiplc
Posts: 8
Joined: 18 Oct 2014, 15:52

Re: \uxxxx 转换为中文 及 反向转换

20 Apr 2015, 12:13

Code: Select all

MsgBox % UnescapeUnicodeHexNotation("\u7231\u5c14\u5170\u4e4b\u72d0")
UnescapeUnicodeHexNotation(Unicodehex)
{
   pos := 0
   While pos := RegExMatch(Unicodehex, "\\u(?P<hex>[0-9a-fA-F]{2,4})", m_, pos+1)
   {
      VarSetCapacity(LE, 2, "UShort")
      NumPut("0x" . m_hex, LE)
      s := StrGet(&LE, 2)          ; StrGet(&sData,"cp0")
      StringReplace, Unicodehex, Unicodehex, %m_%, %s%, All
   }   ; [参考] http://ahk8.com/thread-1927.html?highlight=%E7%BF%BB%E8%AF%91#post_11658
   Return Unicodehex
}
附录:Decimal NCR编解码 &#20013;&#22269; &#x4e2d;&#x56fd;

Code: Select all

; msgbox, % HexEscape("爱尔兰之狐" )
HexEscape(cnStr) ;  "爱尔兰之狐" --> "\u7231\u5C14\u5170\u4E4B\u72D0"
{ ; from tmplinshi
    OldFormat := A_FormatInteger
    SetFormat, Integer, Hex
    Loop, Parse, cnStr
        out .= "\u" . SubStr( Asc(A_LoopField), 3 )
    SetFormat, Integer, %OldFormat%
    Return out
}  ; http://ahkscript.org/boards/viewtopic.php?f=28&t=3897&sid=7cfc6b20e192d838e1c127b6da9f275c

; msgbox, % Unescape("\u7231\u5c14\u5170\u4e4b\u72d0")
UnHexEscape(uXXXX) ; in: "\u7231\u5c14\u5170\u4e4b\u72d0"  out: "爱尔兰之狐"  注意:不能参杂其他字符
{   ; by RobertL
    Loop, Parse, uXXXX, u, \
        retStr .= Chr("0x" . A_LoopField) ;为字符串添加16进制前缀。字符=Chr(编码)。
    return retStr
}  ; http://ahkscript.org/boards/viewtopic.php?f=28&t=3897&sid=7cfc6b20e192d838e1c127b6da9f275c

MsgBox % JavaEscapedToUnicode("\u7231\u5c14\u5170\u4e4b\u72d0")
JavaEscapedToUnicode(s) 
{  ; by tmplinshi
    i := 1
    while j := RegExMatch(s, "\\u[A-Fa-f0-9]{2,4}", m, i)
        e .= SubStr(s, i, j-i) Chr("0x" SubStr(m, 3)), i := j + StrLen(m)
    return e . SubStr(s, i)
}  ; For AutoHotkey Basic and AutoHotkey_L ANSI, note that anything higher than \u007F may be incorrect if your system code page is not 1252 (i.e. US English).
; http://www.autohotkey.com/board/topic/63263-unicode-escaped-string-convert-u00/?p=398749

MsgBox % UnescapeUnicodeHexNotation("\u7231\u5c14\u5170\u4e4b\u72d0")
UnescapeUnicodeHexNotation(Unicodehex)
{
	pos := 0
	While pos := RegExMatch(Unicodehex, "\\u(?P<hex>[0-9a-fA-F]{2,4})", m_, pos+1)
	{
		VarSetCapacity(LE, 2, "UShort")
		NumPut("0x" . m_hex, LE)
		s := StrGet(&LE, 2)          ; StrGet(&sData,"cp0")
		StringReplace, Unicodehex, Unicodehex, %m_%, %s%, All
	}   ; [参考] http://ahk8.com/thread-1927.html?highlight=%E7%BF%BB%E8%AF%91#post_11658
	Return Unicodehex
}

uri := "file:///D:/03%20Schreiben/01_Texte/15%20%E2%80%93%20Encyclop%C3%A4dien/Encyclopedia%20of%20Sociology.pdf"


; http://www.javzoo.com/cn/search/"+encodeURIComponent($('#search-input').val().replace(/\./g,'-'));
; MSScriptControl.ScriptControlClass WIN7下无效的类 解决办法: 运行 Regsvr32 msscript.ocx   http://bbs.csdn.net/topics/310013545
encodeURIComponent(Uri){
    oSC := ComObjCreate("ScriptControl"), oSC.Language := "JScript"
    Script := "var Encoded = encodeURIComponent(""" . Uri . """)"        
    oSC.ExecuteStatement(Script)
    Return, oSC.Eval("Encoded")  ; encodeURIComponent()不编码的字符: ~!*()'
}  ; 另一个encodeURI() 不编码的字符: [email protected]#@{content}*()=:/,;?+'

msgbox % decodeURIComponent( uri )
decodeURIComponent(Uri){
    oSC := ComObjCreate("ScriptControl"), oSC.Language := "JScript"
    Script := "var Decoded = decodeURIComponent(""" . Uri . """)"
    oSC.ExecuteStatement(Script)
    Return, oSC.Eval("Decoded")
}  ; ScriptControl版本 http://www.autohotkey.com/board/topic/75...ntry492181
 
msgbox % decodeURI( uri )
decodeURI( u )
{
    ( obj := ComObjCreate( "ScriptControl" ) ).Language := "JScript"
    return obj.Eval( "decodeURI(`""" u `""");" )
}  ; https://gist.github.com/TLMcode/390a627237c500678adf
 
decodeURI64bit( u )
{
    ( obj:=ComObjCreate("HTMLfile") ).write("<p>/</p><script>document.getElementsByTagName(""p"")[0].innerHTML=decodeURI(`""" u `""");</script>")
    return obj.getElementsByTagName("p")[0].innerHTML
}  ; https://gist.github.com/TLMcode/6c4e12da47e3df270274

 ; modified from jackieku's code (http://www.autohotkey.com/forum/post-310959.html#310959)
 ; 中文字符集编码Unicode ,gb2312 , cp936 ,GBK,GB18030  http://www.cnblogs.com/finallyliuyu/archive/2013/05/10/3071023.html
UriEncode(Uri, Enc = "UTF-8")
{
    StrPutVar(Uri, Var, Enc)
    f := A_FormatInteger
    SetFormat, IntegerFast, H
    Loop
    {
        Code := NumGet(Var, A_Index - 1, "UChar")
        If (!Code)
            Break
        If (Code >= 0x30 && Code <= 0x39 ; 0-9
            || Code >= 0x41 && Code <= 0x5A ; A-Z
            || Code >= 0x61 && Code <= 0x7A) ; a-z
            Res .= Chr(Code)
        Else
            Res .= "%" . SubStr(Code + 0x100, -1)
    }
    SetFormat, IntegerFast, %f%
    Return, Res
}        ; UriEncode("伊東エリ", "cp20936")  ; GB2312   cp10002是MAC机上的big5编码,950是ANSI的标准

; MsgBox, % UriDecode(Uri, "cp20936")  
UriDecode(Uri, Enc = "UTF-8")  ; CP936对应的就是GBK,有21791个汉字,GB2312-1980,CP20936它含ASCII字符,日文假名(字母),俄文字母,7千左右的中文字。
{
    Pos := 1
    Loop
    {
        Pos := RegExMatch(Uri, "i)(?:%[\da-f]{2})+", Code, Pos++)
        If (Pos = 0)
            Break
        VarSetCapacity(Var, StrLen(Code) // 3, 0)
        StringTrimLeft, Code, Code, 1
        Loop, Parse, Code, `%
            NumPut("0x" . A_LoopField, Var, A_Index - 1, "UChar")
        StringReplace, Uri, Uri, `%%Code%, % StrGet(&Var, Enc), All
    }
    Return, Uri
}

StrPutVar(Str, ByRef Var, Enc = "")
{
    Len := StrPut(Str, Enc) * (Enc = "UTF-16" || Enc = "CP1200" ? 2 : 1)
    VarSetCapacity(Var, Len, 0)
    Return, StrPut(Str, &Var, Enc),VarSetCapacity(var,-1)
}


; Decimal NCR编码 HTML、XML等语言的转义序列(numeric character reference(NCR))
; 数字取值为目标字符的 Unicode code point;以「&#」开头的后接十进制数字,以「&#x」开头的后接十六进制数字。
; 如&#20013;&#22269;等同与"中国" Asc("中")=20013   另一种形式%26%2320013%3B
EscapeDecimalNCR(text, encodeuri=0)
{
	Loop, Parse, text
		if encodeuri = hex
		{
		    OldFormat := A_FormatInteger
		    SetFormat, Integer, Hex
		    out .= "&#x" . SubStr( Asc(A_LoopField), 3 ) . ";"
		    SetFormat, Integer, %OldFormat%
		}
		else if !encodeuri
			out .= "&#" . Asc(A_LoopField) . ";"
		else 
			out .= "%26%23" . Asc(A_LoopField) . "%3B"
	return out
}

test =
(Join<br>
ch &#21270;&#31911;&#21697;ch ch ch ch &#36890;&#36009;
&#8364;
)
Msgbox % ConvertText("test")
ConvertText(strHTML)
{
  doc := ComObjCreate("HTMLfile")
  doc.write(strHTML)
  return doc.body.innerText
}  ; http://ahk8.com/qa/139#175

jSplode(str,del) {
    ;////////////////jSplode by TLM 12.31.12
    sc:=ComObjCreate("ScriptControl"),sc.Language:="JScript"
    js:="str='" str "';aR=str.split(""" del """);", sc.ExecuteStatement(js)
    Return sc.Eval("aR")
}  ; http://www.autohotkey.com/board/topic/90130-is-there-any-way-to-execute-javascript-code-via-ahk/

; Unicode2Ansi(UUU, rUUU, 0)
Unicode2Ansi(ByRef wString, ByRef sString, CP = 0)  ; 这个函数是从论坛上抄下来的
{
    nSize := DllCall("WideCharToMultiByte", "Uint", CP, "Uint", 0, "Uint", &wString, "int",  -1, "Uint", 0, "int", 0, "Uint", 0, "Uint", 0) 
    VarSetCapacity(sString, nSize)
    DllCall("WideCharToMultiByte", "Uint", CP, "Uint", 0, "Uint", &wString, "int",  -1, "str",  sString, "int",  nSize, "Uint", 0, "Uint", 0)
}
arcticir
Posts: 642
Joined: 17 Nov 2013, 11:32

Re: \uxxxx 转换为中文 及 反向转换

26 Aug 2015, 15:32

前几天写JSON函数,恰好也写到这部分。

Code: Select all

if e:=InStr(s,"\u")
	for e,n in StrSplit(SubStr(s, e+2), "\u")
		(n and !f[b:=SubStr(n, 1, 4)]
			? (f[b]:=1,(d := Abs("0x" b))< 0x100?(s:=StrReplace(s,"\u" b,Chr(d))):"")
			: "")

Return to “脚本函数”

Who is online

Users browsing this forum: No registered users and 12 guests