From 8e51b75b976feab3ef4579d5f6075083e1bd5dcc Mon Sep 17 00:00:00 2001 From: mösi Date: Wed, 15 Apr 2009 14:23:32 +0000 Subject: Compose-Konvertierung im SMP-Bereich (Unicode-Codepoints > UFFFF) korrigiert. git-svn-id: https://svn.neo-layout.org@1791 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/neo-vars/src/source/compose-gen.ahk | 6 +- windows/neo-vars/src/source/compose.generated.ahk | 158 +++++++++++----------- windows/neo-vars/src/source/makecompose.ahk | 32 +++-- 3 files changed, 99 insertions(+), 97 deletions(-) (limited to 'windows') diff --git a/windows/neo-vars/src/source/compose-gen.ahk b/windows/neo-vars/src/source/compose-gen.ahk index 873724d..4942d2f 100644 --- a/windows/neo-vars/src/source/compose-gen.ahk +++ b/windows/neo-vars/src/source/compose-gen.ahk @@ -1805,7 +1805,7 @@ SetFormat, Integer, hex } else { result .= "U" . SubStr("000000" . SubStr((((char & 0x1F) << 6) + (char2 & 0x3F)),3),-5) } - } else if (char < 0xF8) { + } else if (char < 0xF0) { char2 := asc(SubStr(str,1,1)) char3 := asc(SubStr(str,2,1)) str := SubStr(str,3) @@ -1815,10 +1815,10 @@ SetFormat, Integer, hex } else { result .= "U" . SubStr("000000" . SubStr((((char & 0x0F) << 12) + ((char2 & 0x3F) << 6) + (char3 & 0x3F)),3),-5) } - } else if (char < 0xFC) { + } else if (char < 0xF8) { char2 := asc(SubStr(str,1,1)) char3 := asc(SubStr(str,2,1)) - char3 := asc(SubStr(str,3,1)) + char4 := asc(SubStr(str,3,1)) str := SubStr(str,4) if ( (char2 < 0x80) or (char2 > 0xBF) or (char3 < 0x80) or (char3 > 0xBF) diff --git a/windows/neo-vars/src/source/compose.generated.ahk b/windows/neo-vars/src/source/compose.generated.ahk index ec08e33..6ac7a45 100644 --- a/windows/neo-vars/src/source/compose.generated.ahk +++ b/windows/neo-vars/src/source/compose.generated.ahk @@ -1,4 +1,4 @@ -CompRevision := "1787" +CompRevision := "1790" LoadDefaultCompose() { global @@ -15359,44 +15359,44 @@ LoadDefaultCompose() { CRCU002134.=" S__CompU000073U000063U00006F" CDS__CompU00007CU000041:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000041" - CDS__CompU00007CU000042:="U000754" - CRCU000754.=" S__CompU00007CU000042" + CDS__CompU00007CU000042:="U01D539" + CRCU01D539.=" S__CompU00007CU000042" CDS__CompU00007CU000043:="U002102" CRCU002102.=" S__CompU00007CU000043" - CDS__CompU00007CU000044:="U000754" - CRCU000754.=" S__CompU00007CU000044" - CDS__CompU00007CU000045:="U000754" - CRCU000754.=" S__CompU00007CU000045" - CDS__CompU00007CU000046:="U000754" - CRCU000754.=" S__CompU00007CU000046" - CDS__CompU00007CU000047:="U000754" - CRCU000754.=" S__CompU00007CU000047" + CDS__CompU00007CU000044:="U01D53B" + CRCU01D53B.=" S__CompU00007CU000044" + CDS__CompU00007CU000045:="U01D53C" + CRCU01D53C.=" S__CompU00007CU000045" + CDS__CompU00007CU000046:="U01D53D" + CRCU01D53D.=" S__CompU00007CU000046" + CDS__CompU00007CU000047:="U01D53E" + CRCU01D53E.=" S__CompU00007CU000047" CDS__CompU00007CU000048:="U00210D" CRCU00210D.=" S__CompU00007CU000048" - CDS__CompU00007CU000049:="U000755" - CRCU000755.=" S__CompU00007CU000049" - CDS__CompU00007CU00004A:="U000755" - CRCU000755.=" S__CompU00007CU00004A" - CDS__CompU00007CU00004B:="U000755" - CRCU000755.=" S__CompU00007CU00004B" - CDS__CompU00007CU00004C:="U000755" - CRCU000755.=" S__CompU00007CU00004C" + CDS__CompU00007CU000049:="U01D540" + CRCU01D540.=" S__CompU00007CU000049" + CDS__CompU00007CU00004A:="U01D541" + CRCU01D541.=" S__CompU00007CU00004A" + CDS__CompU00007CU00004B:="U01D542" + CRCU01D542.=" S__CompU00007CU00004B" + CDS__CompU00007CU00004C:="U01D543" + CRCU01D543.=" S__CompU00007CU00004C" CDS__CompU00007CU00004D:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU00004D" CDS__CompU00007CU00004E:="U002115" CRCU002115.=" S__CompU00007CU00004E" - CDS__CompU00007CU00004F:="U000755" - CRCU000755.=" S__CompU00007CU00004F" + CDS__CompU00007CU00004F:="U01D546" + CRCU01D546.=" S__CompU00007CU00004F" CDS__CompU00007CU000050:="U002119" CRCU002119.=" S__CompU00007CU000050" CDS__CompU00007CU000051:="U00211A" CRCU00211A.=" S__CompU00007CU000051" CDS__CompU00007CU000052:="U00211D" CRCU00211D.=" S__CompU00007CU000052" - CDS__CompU00007CU000053:="U000755" - CRCU000755.=" S__CompU00007CU000053" - CDS__CompU00007CU000054:="U000755" - CRCU000755.=" S__CompU00007CU000054" + CDS__CompU00007CU000053:="U01D54A" + CRCU01D54A.=" S__CompU00007CU000053" + CDS__CompU00007CU000054:="U01D54B" + CRCU01D54B.=" S__CompU00007CU000054" CDS__CompU00007CU000055:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000055" CDS__CompU00007CU000056:="U00FFFD" @@ -15405,62 +15405,62 @@ LoadDefaultCompose() { CRCU00FFFD.=" S__CompU00007CU000057" CDS__CompU00007CU000058:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000058" - CDS__CompU00007CU000059:="U000755" - CRCU000755.=" S__CompU00007CU000059" + CDS__CompU00007CU000059:="U01D550" + CRCU01D550.=" S__CompU00007CU000059" CDS__CompU00007CU00005A:="U002124" CRCU002124.=" S__CompU00007CU00005A" CDS__CompU00007CU000061:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000061" - CDS__CompU00007CU000062:="U000755" - CRCU000755.=" S__CompU00007CU000062" - CDS__CompU00007CU000063:="U000755" - CRCU000755.=" S__CompU00007CU000063" + CDS__CompU00007CU000062:="U01D553" + CRCU01D553.=" S__CompU00007CU000062" + CDS__CompU00007CU000063:="U01D554" + CRCU01D554.=" S__CompU00007CU000063" CDS__CompU00007CU000064:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000064" CDS__CompU00007CU000065:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000065" - CDS__CompU00007CU000066:="U000755" - CRCU000755.=" S__CompU00007CU000066" - CDS__CompU00007CU000067:="U000755" - CRCU000755.=" S__CompU00007CU000067" + CDS__CompU00007CU000066:="U01D557" + CRCU01D557.=" S__CompU00007CU000066" + CDS__CompU00007CU000067:="U01D558" + CRCU01D558.=" S__CompU00007CU000067" CDS__CompU00007CU000068:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000068" - CDS__CompU00007CU000069:="U000755" - CRCU000755.=" S__CompU00007CU000069" + CDS__CompU00007CU000069:="U01D55A" + CRCU01D55A.=" S__CompU00007CU000069" CDS__CompU00007CU00006A:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU00006A" - CDS__CompU00007CU00006B:="U000755" - CRCU000755.=" S__CompU00007CU00006B" + CDS__CompU00007CU00006B:="U01D55C" + CRCU01D55C.=" S__CompU00007CU00006B" CDS__CompU00007CU00006C:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU00006C" CDS__CompU00007CU00006D:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU00006D" CDS__CompU00007CU00006E:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU00006E" - CDS__CompU00007CU00006F:="U000755" - CRCU000755.=" S__CompU00007CU00006F" - CDS__CompU00007CU000070:="U000755" - CRCU000755.=" S__CompU00007CU000070" + CDS__CompU00007CU00006F:="U01D560" + CRCU01D560.=" S__CompU00007CU00006F" + CDS__CompU00007CU000070:="U01D561" + CRCU01D561.=" S__CompU00007CU000070" CDS__CompU00007CU000071:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000071" - CDS__CompU00007CU000072:="U000755" - CRCU000755.=" S__CompU00007CU000072" - CDS__CompU00007CU000073:="U000755" - CRCU000755.=" S__CompU00007CU000073" - CDS__CompU00007CU000074:="U000755" - CRCU000755.=" S__CompU00007CU000074" + CDS__CompU00007CU000072:="U01D563" + CRCU01D563.=" S__CompU00007CU000072" + CDS__CompU00007CU000073:="U01D564" + CRCU01D564.=" S__CompU00007CU000073" + CDS__CompU00007CU000074:="U01D565" + CRCU01D565.=" S__CompU00007CU000074" CDS__CompU00007CU000075:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000075" - CDS__CompU00007CU000076:="U000755" - CRCU000755.=" S__CompU00007CU000076" + CDS__CompU00007CU000076:="U01D567" + CRCU01D567.=" S__CompU00007CU000076" CDS__CompU00007CU000077:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000077" CDS__CompU00007CU000078:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000078" - CDS__CompU00007CU000079:="U000755" - CRCU000755.=" S__CompU00007CU000079" - CDS__CompU00007CU00007A:="U000755" - CRCU000755.=" S__CompU00007CU00007A" + CDS__CompU00007CU000079:="U01D56A" + CRCU01D56A.=" S__CompU00007CU000079" + CDS__CompU00007CU00007A:="U01D56B" + CRCU01D56B.=" S__CompU00007CU00007A" CDS__CompU00007CU000030:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000030" CDS__CompU00007CS__N__0:="U00FFFD" @@ -15469,34 +15469,34 @@ LoadDefaultCompose() { CRCU00FFFD.=" S__CompU00007CU000031" CDS__CompU00007CS__N__1:="U00FFFD" CRCU00FFFD.=" S__CompU00007CS__N__1" - CDS__CompU00007CU000032:="U00075F" - CRCU00075F.=" S__CompU00007CU000032" - CDS__CompU00007CS__N__2:="U00075F" - CRCU00075F.=" S__CompU00007CS__N__2" + CDS__CompU00007CU000032:="U01D7DA" + CRCU01D7DA.=" S__CompU00007CU000032" + CDS__CompU00007CS__N__2:="U01D7DA" + CRCU01D7DA.=" S__CompU00007CS__N__2" CDS__CompU00007CU000033:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000033" CDS__CompU00007CS__N__3:="U00FFFD" CRCU00FFFD.=" S__CompU00007CS__N__3" - CDS__CompU00007CU000034:="U00075F" - CRCU00075F.=" S__CompU00007CU000034" - CDS__CompU00007CS__N__4:="U00075F" - CRCU00075F.=" S__CompU00007CS__N__4" - CDS__CompU00007CU000035:="U00075F" - CRCU00075F.=" S__CompU00007CU000035" - CDS__CompU00007CS__N__5:="U00075F" - CRCU00075F.=" S__CompU00007CS__N__5" - CDS__CompU00007CU000036:="U00075F" - CRCU00075F.=" S__CompU00007CU000036" - CDS__CompU00007CS__N__6:="U00075F" - CRCU00075F.=" S__CompU00007CS__N__6" - CDS__CompU00007CU000037:="U00075F" - CRCU00075F.=" S__CompU00007CU000037" - CDS__CompU00007CS__N__7:="U00075F" - CRCU00075F.=" S__CompU00007CS__N__7" - CDS__CompU00007CU000038:="U00075F" - CRCU00075F.=" S__CompU00007CU000038" - CDS__CompU00007CS__N__8:="U00075F" - CRCU00075F.=" S__CompU00007CS__N__8" + CDS__CompU00007CU000034:="U01D7DC" + CRCU01D7DC.=" S__CompU00007CU000034" + CDS__CompU00007CS__N__4:="U01D7DC" + CRCU01D7DC.=" S__CompU00007CS__N__4" + CDS__CompU00007CU000035:="U01D7DD" + CRCU01D7DD.=" S__CompU00007CU000035" + CDS__CompU00007CS__N__5:="U01D7DD" + CRCU01D7DD.=" S__CompU00007CS__N__5" + CDS__CompU00007CU000036:="U01D7DE" + CRCU01D7DE.=" S__CompU00007CU000036" + CDS__CompU00007CS__N__6:="U01D7DE" + CRCU01D7DE.=" S__CompU00007CS__N__6" + CDS__CompU00007CU000037:="U01D7DF" + CRCU01D7DF.=" S__CompU00007CU000037" + CDS__CompU00007CS__N__7:="U01D7DF" + CRCU01D7DF.=" S__CompU00007CS__N__7" + CDS__CompU00007CU000038:="U01D7E0" + CRCU01D7E0.=" S__CompU00007CU000038" + CDS__CompU00007CS__N__8:="U01D7E0" + CRCU01D7E0.=" S__CompU00007CS__N__8" CDS__CompU00007CU000039:="U00FFFD" CRCU00FFFD.=" S__CompU00007CU000039" CDS__CompU00007CS__N__9:="U00FFFD" diff --git a/windows/neo-vars/src/source/makecompose.ahk b/windows/neo-vars/src/source/makecompose.ahk index e8e09b2..a67b3f8 100644 --- a/windows/neo-vars/src/source/makecompose.ahk +++ b/windows/neo-vars/src/source/makecompose.ahk @@ -1817,25 +1817,26 @@ SetFormat, Integer, hex result := "" loop { achar := asc(SubStr(str,1,1)) - str := SubStr(str,2) - if (achar < 0x80) + if (achar < 0x80) { + str := SubStr(str,2) result .= "U" . SubStr("000000" . SubStr(achar,3),-5) - else if (achar < 0xC0) { + } else if (achar < 0xC0) { + str := SubStr(str,2) ; error } else if (achar < 0xE0) { - achar2 := asc(Substr(str,1,1)) - str := SubStr(str,2) + achar2 := asc(Substr(str,2,1)) + str := SubStr(str,3) if ((achar2 < 0x80) or (achar2 > 0xBF)) { ; error } else { result .= "U" . SubStr("000000" . SubStr((((achar & 0x1F) << 6) + (achar2 & 0x3F)),3),-5) } - } else if (achar < 0xF8) { - achar2 := asc(SubStr(str,1,1)) - achar3 := asc(SubStr(str,2,1)) - str := SubStr(str,3) + } else if (achar < 0xF0) { + achar2 := asc(SubStr(str,2,1)) + achar3 := asc(SubStr(str,3,1)) + str := SubStr(str,4) ; MsgBox % "chars: " . achar . ", " . achar2 . ", " . achar3 . ", str: " . str - if ((achar2 < 0x80) or (achar2 > 0xBF) + if ( (achar2 < 0x80) or (achar2 > 0xBF) or (achar3 < 0x80) or (achar3 > 0xBF)) { ; error } else { @@ -1843,11 +1844,11 @@ SetFormat, Integer, hex ; MsgBox % (((achar & 0x0F) << 12) + ((achar2 & 0x3F) << 6) + (achar3 & 0x3F)) result .= "U" . SubStr("000000" . SubStr((((achar & 0x0F) << 12) + ((achar2 & 0x3F) << 6) + (achar3 & 0x3F)),3),-5) } - } else if (char < 0xFC) { - achar2 := asc(SubStr(str,1,1)) - achar3 := asc(SubStr(str,2,1)) + } else if (achar < 0xF8) { + achar2 := asc(SubStr(str,2,1)) achar3 := asc(SubStr(str,3,1)) - str := SubStr(str,4) + achar4 := asc(SubStr(str,4,1)) + str := SubStr(str,5) if ( (achar2 < 0x80) or (achar2 > 0xBF) or (achar3 < 0x80) or (achar3 > 0xBF) or (achar4 < 0x80) or (achar4 > 0xBF)) { @@ -1855,7 +1856,8 @@ SetFormat, Integer, hex } else { result .= "U" . SubStr("000000" . SubStr((((achar & 0x07) << 18) + ((achar2 & 0x3F) << 12) + ((achar3 & 0x3F) << 6) + (achar4 & 0x3F)),3),-5) } - } + } else + str := SubStr(str,2) if (str == "") break } -- cgit v1.2.3