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

How to deal with umlauts (utf8 / unicode) #25

Open
ghost opened this issue Jul 16, 2017 · 3 comments
Open

How to deal with umlauts (utf8 / unicode) #25

ghost opened this issue Jul 16, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 16, 2017

Hey there,

first of all thank you for the great tutorial. I followed your steps and got a working editor, ( I skipped the search for now).

But I have one big problem:
When I type umlauts, I get a spacing error. I tried to play around with the output of the step "ctrl-q" but only got weird symbols as an output.

The problem with those chars is that they use 2 positions in the x variable of the cursor, but I fail to understand how I can determine when such a wide char is used.
Also, maybe char is the wrong type to read that kind of input?

Hope you can help me.

@nirs
Copy link
Contributor

nirs commented Jul 16, 2017

I don't think supporting unicode is feasible for 1k loc editor. The proper way to deal with it is to use a real editor :-)

@ghost
Copy link
Author

ghost commented Jul 16, 2017

Even if it is out of scope for kilo, a notice in the appendix with links to learn more (after all it is a beginners tutorial) would be greate.

@paigeruten
Copy link
Contributor

Yes, it seems like it would be too complicated to add unicode support to the tutorial. However, you should be able to change the character encoding of your terminal to use an extended ASCII encoding (like ISO 8859-1), and then umlauts should at least show up when you type them in the editor.

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

2 participants