From ce18ccc1f3ce2239e8cf1ac02eafd9497d56b44e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=B6si?= Date: Fri, 7 Nov 2008 10:27:11 +0000 Subject: =?UTF-8?q?=E2=80=A2=20EncodeUni=20kann=20jetzt=20auch=20Zeichen?= =?UTF-8?q?=20von=20U+0001=20bis=20U+000D=20richtig=20umwandeln=20?= =?UTF-8?q?=E2=80=A2=20Iterative=20Herangehensweise=20an=20das=20Ersetzen?= =?UTF-8?q?=20der=20mit=20Backslach=20escape-ten=20Zeichen,=20speziell=20\?= =?UTF-8?q?n=20wird=20jetzt=20korrekt=20ersetzt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@1130 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/neo-vars/src/Source/makecompose.ahk | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'windows/neo-vars/src/Source') 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")) -- cgit v1.2.3