summaryrefslogtreecommitdiffstats
path: root/windows/neo-vars/src/Source/makecompose.ahk
diff options
context:
space:
mode:
Diffstat (limited to 'windows/neo-vars/src/Source/makecompose.ahk')
-rw-r--r--windows/neo-vars/src/Source/makecompose.ahk31
1 files changed, 26 insertions, 5 deletions
diff --git a/windows/neo-vars/src/Source/makecompose.ahk b/windows/neo-vars/src/Source/makecompose.ahk
index 37f040d..5f96163 100644
--- a/windows/neo-vars/src/Source/makecompose.ahk
+++ b/windows/neo-vars/src/Source/makecompose.ahk
@@ -1823,12 +1823,18 @@ SetFormat, Integer, d
VarSetCapacity(Composita,10240000) ; 10 MB
-EncodeUnicodeFile(FFrom,FTo,NumLines) {
+EncodeUnicodeFile(FFrom,FTo) {
Composita := ""
-Count := 0
Miss := 0
FileRead, FileContents, %FFrom%
ProgressTop := "Converting " . FFrom . "..."
+
+ Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windows and Unix files to be parsed.
+ {
+ NumLines := A_Index
+ }
+
+ Count := 0
Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windows and Unix files to be parsed.
{
Count := Count + 1
@@ -1892,12 +1898,27 @@ Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windo
Miss := Miss + 1
}
}
-FileDelete,%FTo%
+ Progress,off
FileAppend,%Composita%,%FTo%
}
-EncodeUnicodeFile("..\..\..\Compose\en_US.UTF-8","Source\en_us.ahk" ,5609)
-EncodeUnicodeFile("..\..\..\Compose\Compose.neo","Source\neocomp.ahk" ,1067)
+NumPars = %0%
+if (NumPars < 2) {
+ MsgBox,Zu wenige Parameter`, Minimum=2
+ exit
+}
+
+CompRevision = %1%
+OutputFile = %2%
+
+FileDelete,%OutputFile%
+FileAppend,CompRevision := "%CompRevision%"`r`n, %OutputFile%
+
+loop %Numpars% {
+ if (A_Index < 3)
+ continue
+ EncodeUnicodeFile(%A_Index%, OutputFile)
+}
; MsgBox % EncodeUni(DecodeUni("U20ACU0041U0070"))