-
Notifications
You must be signed in to change notification settings - Fork 246
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
Display wide characters correctly (Part I) #94
Conversation
@yan12125 - hmm, i would prevent submodules wherever i could in the real development process (bitten one time to much) - but submodules are generally a nice way to get the current code of something if one know about the pitfalls - if not one will learn them very fast. |
Yes there are indeed tricky edges for submodules. How about copy termux/wcwidth.c into |
@yan12125 - can you please provide the Header or the file as a gist - so i could have a look at - if it is the same as this:
we should take the original one - the license header look like a short form of an ancient MIT-License, which would be compatible with the LGPL :) |
I guess it's MIT-like, too, but I didn't find any explicit license declaration in termux/wcwidth, so I ask them there: termux/wcwidth#2 |
a big no - we don't want one or two files without license headers which are copied from an obscure project without any license hint - i can only guess that these guys cutted the stuff they needed out from the original file - in this case we should use the original file and port needed things back into this file or simply write a wrapper - but please no git submodule in this case, it's a no go. |
If the termux variant adds a license header later, can we use it? |
the problem is a little bit deeper i guess - if they have copied it they should have leave the original license intact - or at least credit the orginal author - but not strip the useless header away :) - if they add the header back we can use it - i would prefer the original file and get the needed parts from them. And make a copy not including their repo - ucs isn't known to change often these days. Hmm, maybe i'm to much influenced by debian - but the problem is that i as a packager must be able to redistribute this file later - so it should have a proper and valid license. License violations are not cool when the main project is under LGPL - bah, couln't belive that i write such things :D |
From what I can see termux/wcwidth (written in C) is based on jquast/wcwidth (written in Python) [1], and the latter is based on Markus Kuhn's version (written in C). Termux's version is not an expansion of Markus Kuhn's version. I choose Termux's version as it targets Unicode 9.0, while Markus Kuhn's one is for Unicode 5.0. I'm just too lazy to update the table again. For why termux lacks a LICENSE file - I guess they don't have the habit to keep things tidy :) [1] It's mentioned in termux/wcwidth's README: https://github.com/termux/wcwidth/blob/master/README.md |
thats not sufficient |
I'll wait for some to see whether people at Termux are serious to their fork or not. If I get no response I'll try to update Markus Kuhn's version to Unicode 9.0. |
Hello @agaida, a Termux member has added a MIT license declaration in termux/wcwidth@aae3753. Is it good to move on? |
nearly ok i think - to be honest i would only copy both files ( w*.c and .h) and integrate it. However, the *.c and *.h files should contain a license header - you could help them with that, a PR is no rocket science. With the headers in place no objections. But pleae leave out the sub-modules. |
Another upstream update: termux/wcwidth@d48cb1e. I guess that looks good now? |
yes - but i'm still not ok with the git submodule. Another point - we should/must give the distributions the chance to use their own wcwitdh package - so the usage of the third party code should be optional. |
Force pushed. I have some modifications to termux's version. Changes can be found in my fork: https://github.com/yan12125/wcwidth/commits/master |
exactly the opposite - sorry for being pain in the ass. Glad you found a better solution. Thank you very much. |
The ancient
konsole_wcwidth
can't recognize some double-width characters. For example, copy and paste the string《別來無恙》
into bash, and move cursors around with left arrow, right arrow, Home and End keys. The current line becomes a mess. My patch fixes this problem.The story doesn't end here. For example, if I paste
𝕐
into the shell, things are even worse. That's because QTerminal assume characters to be UCS-2, so it cannot handle characters outside the Basic Multilingual Plane correctly. I'd like to leave this problem into the next pull request.By the way, is git submodule a good idea for external dependencies? This version looks the most promising, as it declares to be "Unicode 9-conformant", and is used in Termux, one of the most popular terminal emulators on Android.