Skip to content
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

MSKLC does not accept LF line endings generated on Linux #34

Open
barkloaf opened this issue May 23, 2021 · 8 comments
Open

MSKLC does not accept LF line endings generated on Linux #34

barkloaf opened this issue May 23, 2021 · 8 comments

Comments

@barkloaf
Copy link

no matter what i do, i cannot seem to get a klc file exported by klfc into msklc correctly without that (sadly nondescriptive) error
i have a json file in your format that i want to use, mainly in xkb (which works) and klc
i even imported a working klc file (after doing what was referenced in issue #29 ) into the json format, and then exported the json back into klc and it still does not work

this is the file i want to work (not the file i converted klc -> json -> klc):
us-refor.klc.txt
and yes, it's a modified version of US-International to suit my wants, oft-performed genre of keyboard layouts but i mean that layout is just such a good start so why not

apologies if this isn't the right place to ask

@DreymaR
Copy link

DreymaR commented May 24, 2021

I just tried out your file in MSKLC and there's no problem for me. I loaded your layout file into a .klc file, validated and tested it.

Colemak-eD is a lot better anyway.  ̄(=⌒ᆺ⌒=) ̄

@barkloaf
Copy link
Author

barkloaf commented May 24, 2021

I just tried out your file in MSKLC and there's no problem for me. I loaded your layout file into a .klc file, validated and tested it.

Colemak-eD is a lot better anyway.  ̄(=⌒ᆺ⌒=) ̄

well then, i have 0 idea what to do
it doesn't work for me full stop. are you just using Load source file...?

@DreymaR
Copy link

DreymaR commented May 25, 2021

What I actually did was fire up MSKLC, load a layout and save it as a klc file, then paste your .txt into that replacing everything.

One thought, maybe totally wrong but... Could it be a matter of line endings or document encoding being wrong for you?

@barkloaf
Copy link
Author

What I actually did was fire up MSKLC, load a layout and save it as a klc file, then paste your .txt into that replacing everything.

One thought, maybe totally wrong but... Could it be a matter of line endings or document encoding being wrong for you?

alright, i did the same thing and it worked for me as well, but it would really be ideal if the klc files exported by klfc just worked initially
it could definitely be an encoding thing, but i'm not sure what windows/msklc likes. i tried re-saving the original UTF-8 klfc output as UTF-16 LE in notepad, but this didn't work

@DreymaR
Copy link

DreymaR commented May 26, 2021

MSKLC files should definitely have Windows line endings (\r\n). The one I'm looking at right now uses UCS-2 LE BOM encoding according to NotePad++, and that works with MSKLC. So yeah, UTF-8 may not cut it...?

@barkloaf
Copy link
Author

alright, you are definitely right about the line endings
a utf-8 file with only the endings changed from LF to CRLF worked for me.. so.. it might be best if the program just spat out these different line endings?

@39aldo39
Copy link
Owner

I can confirm that the problem has to do with the line endings. It will output CRLF endings when executed on Windows, so it does work then. But on Linux it should also output CRLF for the KLC files, but I haven't implemented that yet.

@barkloaf barkloaf changed the title MSKLC: There was a problem loading this keyboard MSKLC does not accept LF line endings generated on Linux Nov 25, 2021
@jarnowic
Copy link

I can confirm that the problem has to do with the line endings. It will output CRLF endings when executed on Windows, so it does work then. But on Linux it should also output CRLF for the KLC files, but I haven't implemented that yet.

send it through a pipe: klfc <etc> --klc <directory> | unix2dos <directory>/<keyboard>.klc and check it ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants