-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MS KLC 1.4 support? #29
Comments
I think the problem is the encoding. KLFC tries to use UTF-8 for everything, but on Windows it is complicated, and I am not sure what the right thing to do is. Could you try explicitly saving the file as UTF-8? I think Notepad++ for example can do that. BTW, if the problem is in the file itself, you would get a more explicit error message. |
Spot on, converting to UTF8 in notepad++ resolved it, file parsed fine at that point. Thanks! |
VS Code opens 1.4 klc files as UTF-16 LE, I like this project so may try to add some improvements once I've looked over the code, but any way to add an error catch for this where it retries using UTF-16 large endian? |
a pipe running |
Yes, MSKLC uses UTF-16 (LE) encoding natively. I don't think it'll work with other encodings? Therefore, KLFC should use this encoding too. As pointed out in another recent issue, KLFC also needs to use CRLF line endings for KLC files. It should do so regardless of the OS it is run under. See the EPKL MSKLC folder: |
Apologies if I've missed a setup option here, but I was looking to go from KLC -> JSON, and if i load any existing keyboard layout in KLC 1.4, save it, then attempt to parse it with klfc i get an error:
Active code page: 65001 klfc.exe: .\uk.klc: hGetContents: invalid argument (invalid byte sequence)
Having a quick look at the exported KLC examples, there appears to be a few more columns in the KLC file I created versus the example (see attached, generated by loading the existing UK keyboard layout).
uk.klc.txt
The text was updated successfully, but these errors were encountered: