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
this works (11 produces 2, 111 produces 3)
:*?:--:: SendLevel 1 Send – return SendLevel 0 :*?:–-::—
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).
UTF-8 supports any unicode character, which pragmatically means any natural language (Coptic, Sinhala, Phonecian, Cherokee etc), as well as many non-spoken languages (Music notation, mathematical symbols, APL).
UTF-8 is a multibyte encoding able to encode the whole Unicode charset. An encoded character takes between 1 and 4 bytes. UTF-8 encoding supports longer byte sequences, up to 6 bytes, but the biggest code point of Unicode 6.0 (U+10FFFF) only takes 4 bytes.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With