diff options
author | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2008-11-07 10:27:11 +0000 |
---|---|---|
committer | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2008-11-07 10:27:11 +0000 |
commit | ce18ccc1f3ce2239e8cf1ac02eafd9497d56b44e (patch) | |
tree | 65ad3473602776f2caa4e6f33b6e19c95aae7724 /windows | |
parent | 32fa738ecd0cbe8b7a9b0019ef0c5e311d86d37e (diff) |
• EncodeUni kann jetzt auch Zeichen von U+0001 bis U+000D richtig umwandeln
• Iterative Herangehensweise an das Ersetzen der mit Backslach escape-ten Zeichen, speziell \n wird jetzt korrekt ersetzt.
git-svn-id: https://svn.neo-layout.org@1130 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'windows')
-rw-r--r-- | windows/neo-vars/src/Source/makecompose.ahk | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/windows/neo-vars/src/Source/makecompose.ahk b/windows/neo-vars/src/Source/makecompose.ahk index c7b7242..b3e6f18 100644 --- a/windows/neo-vars/src/Source/makecompose.ahk +++ b/windows/neo-vars/src/Source/makecompose.ahk @@ -1788,7 +1788,7 @@ SetFormat, Integer, hex char := SubStr(str,1,1)
str := SubStr(str,2)
if (asc(char) < 0x80)
- result := result . "U00" . SubStr(asc(char),3)
+ result := result . "U" . SubStr("0000" . SubStr(asc(char),3),-3)
else if (asc(char) < 0xC0) {
; error
} else if (asc(char) < 0xE0) {
@@ -1841,7 +1841,21 @@ Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windo Line := RegExReplace(Line,"[\t ]*(<[^>]*>)[\t ]*","$1")
RegExMatch(Line,"([^:]*):[\t ]*""((\\.|[^""])*)"".*",OutputVar)
ReplaceLeft := OutputVar1
- ReplaceRight := RegExReplace(OutputVar2,"\\(.)","$1")
+ ReplaceRight := ""
+ loop {
+ thechar := SubStr(OutputVar2,1,1)
+ OutputVar2 := SubStr(OutputVar2,2)
+ if (thechar == "\") {
+ thechar := SubStr(OutputVar2,1,1)
+ OutputVar2 := SubStr(OutputVar2,2)
+ if (thechar == "n")
+ thechar := chr(0x000d) ; Line-Feed
+ ReplaceRight := ReplaceRight . thechar
+ } else
+ ReplaceRight := ReplaceRight . thechar
+ if (OutputVar2 == "")
+ break
+ }
; care for replaceleft
modkeys := ""
@@ -1882,7 +1896,7 @@ FileDelete,%FTo% FileAppend,%Composita%,%FTo%
}
-EncodeUnicodeFile("..\..\..\Compose\en_US.UTF-8","Source\en_us.ahk" ,5609)
+; EncodeUnicodeFile("..\..\..\Compose\en_US.UTF-8","Source\en_us.ahk" ,5609)
EncodeUnicodeFile("..\..\..\Compose\Compose.neo","Source\neocomp.ahk" ,1067)
; MsgBox % EncodeUni(DecodeUni("U20ACU0041U0070"))
|