Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Autohotkey 替换unicode字符串_Autohotkey - Fatal编程技术网

Autohotkey 替换unicode字符串

Autohotkey 替换unicode字符串,autohotkey,Autohotkey,我有以下代码: replace := {x:"y",≤:"\leq",≥:"\geq",∫:"\int",∑:"\sum"} For what, with in replace f2::StringReplace, clipboard, clipboard, %what%, %with%, All 它可以将x替换为y。但我实际上想用它来代替一大堆unicode数学符号。这个stringreplace函数似乎不适用于unicode,你知道我如何才能得到我想要的吗?这是问这个的合适地方吗

我有以下代码:

replace :=  {x:"y",≤:"\leq",≥:"\geq",∫:"\int",∑:"\sum"}


For what, with in replace
  f2::StringReplace, clipboard, clipboard, %what%, %with%, All

它可以将x替换为y。但我实际上想用它来代替一大堆unicode数学符号。这个stringreplace函数似乎不适用于unicode,你知道我如何才能得到我想要的吗?这是问这个的合适地方吗

当我在旧的Microsoft记事本(在Windows 7上)中创建此脚本,并以
Unicode
格式将其保存为Replace.ahk时,它运行得非常出色

ClipBoard= x123y123≤123≥123∫123∑123
replace :=  {x:"y",≤:"\leq",≥:"\geq",∫:"\int",∑:"\sum"}
For what, with in replace
    StringReplace, clipboard, clipboard, %what%, %with%, All
MsgBox, %clipboard%
ExitApp

这确实是一个字符编码问题。我甚至无法在SciTE4中显示这些字符,但一旦我用“正常”字符(¥ßñÿ)替换它们,它就像一个符咒一样工作。答案是否帮助您解决了这个问题?@RobertIlbrink是的,很好,非常感谢!