Bug 1202022
Summary: | Allow input of non-ASCII UTF-8 characters in readline() function | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Honza Horak <hhorak> | ||||||||
Component: | libedit | Assignee: | Boris Ranto <branto> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
Severity: | unspecified | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 21 | CC: | branto, extras-qa, hhorak, jdornak, jeff, jstanek, loganjerry, lovetide, mmuzila | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | libedit-3.1-10.20141030cvs.fc21 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | 1187469 | ||||||||||
: | 1460155 (view as bug list) | Environment: | |||||||||
Last Closed: | 2015-03-21 04:53:28 UTC | Type: | Bug | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 1180403, 1187469, 1197479, 1460155 | ||||||||||
Attachments: |
|
Description
Honza Horak
2015-03-14 15:58:57 UTC
Created attachment 1001719 [details]
patch that allows non-ascii characters in readline()
Created attachment 1001894 [details]
patch that allows non-ascii characters in readline()
I've found that upstream tarball from community-mysql package bundles libedit that actually supports non-ASCII characters and also supports recursive search and other key bindings.
The attached patch does the trick to handles wchars if the source is UTF-8 and seems to be more correct patch than the previous. Btw. this patch is proofed to work since it has been used in mysql tar ball for some time already.
Created attachment 1001895 [details]
proposed patch to support few basics key bindings
This is also part of the bundled libedit from mysql, which except others enables recursive search in readline().
The first patch looks perfectly reasonable and it looks like it really fixes a bug in libedit sources (the function el_getc already did that sort of thing, not sure why el_gets did not) so I'll go ahead and apply it. The other patch looks a bit more convoluted and I'm not sure whether this is a thing that should be handled in libedit or mariadb. I'll contact libedit upstream to get their opinion on this matter. libedit-3.1-10.20141030cvs.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/libedit-3.1-10.20141030cvs.fc22 libedit-3.1-10.20141030cvs.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/libedit-3.1-10.20141030cvs.fc21 looks like it fixed the mariadb/mysql utf8 characters input issue (although i don't why it does not work for Asterisk package, maybe it's another story). # mysql -V mysql Ver 15.1 Distrib 10.0.17-MariaDB, for Linux (x86_64) using EditLine wrapper Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 10.0.17-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> select '汉字'; +--------+ | 汉字 | +--------+ | 汉字 | +--------+ 1 row in set (0.01 sec) Package libedit-3.1-10.20141030cvs.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libedit-3.1-10.20141030cvs.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-4137/libedit-3.1-10.20141030cvs.fc21 then log in and leave karma (feedback). libedit-3.1-10.20141030cvs.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. libedit-3.1-10.20141030cvs.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. btw: Good news, both patches were accepted upstream so the next rebase will contain even the key bindings patch. I've created the update requests for the rebased packages that contain the keyboard bindings patch: https://admin.fedoraproject.org/updates/libedit-3.1-12.20150325cvs.fc21 https://admin.fedoraproject.org/updates/libedit-3.1-12.20150325cvs.fc22 Test the updated packages please and upvote them if you want to see them in stable ASAP. libedit-3.1-12.20150325cvs.fc21 Karma +1 |