如何在 AutoHotKey 中使用 UTF-8? [英] How do I use UTF-8 in AutoHotKey?

查看:32
本文介绍了如何在 AutoHotKey 中使用 UTF-8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让两个连字符触发一个短划线,三个连字符触发一个长划线;喜欢

I am trying to make two hyphens trigger a short dash, and three hyphens trigger a long dash; like

:*?:---=::—
:*?:--=::–

除了工作.这是我到达的地方:

except working. Here is where I have gotten to:

:*?:11::

SendLevel 1

Send 2

return

SendLevel 0

:*?:21::3

这是有效的(11 产生 2,111 产生 3)

this works (11 produces 2, 111 produces 3)

:*?:--::

SendLevel 1

Send –

return

SendLevel 0

:*?:–-::—

这是同一个脚本,但是'1'被'-'代替,'2'被'-'代替,'3'被'-'代替——--"应该产生-"和---"应该产生-",但它不起作用,因为我使用的版本不完全支持Unicode(来自autohotkey.com的AutoHotKey_L v1.1.09.04).

This is the same script, but ‘1’ has been replaced by ‘-’, ‘2’ has been replaced by ‘–’, and ‘3’ has been replaced by ‘—’—"--" should produce "–" and "---" should produce "—", but it doesn't work because Unicode is not fully supported in the version I am using (AutoHotKey_L v1.1.09.04 from autohotkey.com).

推荐答案

.ahk 文本文件需要使用 UTF8-BOM 编码而不是 UTF8

The .ahk text file needed to be saved with UTF8-BOM encoding rather than UTF8

正如此评论中所指出的,发布作为提高知名度的答案.

As pointed out in this comment, posting as an answer for more visibility.

这篇关于如何在 AutoHotKey 中使用 UTF-8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆