ensure no incomplete utf-8 chars are inserted while in utf-8 mode

Bug #909025 reported by Thorsten Glaser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mksh
Fix Released
High
Unassigned
mksh (Fedora)
Fix Released
Low

Bug Description

This was reported in Red Hat:

Steps to Reproduce:
1. mkdir t && touch t/십일 t/십이
2. Type 'ls t/' and hit <TAB>

Additionally, after this, the cursor seems to somehow be _before_ the incomplete UTF-8 multibyte character, resulting in pretty weird behaviour.

When UTFMODE, this shall not happen.

Revision history for this message
In , Petr (petr-redhat-bugs) wrote :

Description of problem:
Tab completion in mksh seems to work with bytes, not characters. This results in a poor user experience when working with filenames in multibyte encodings.

Version-Release number of selected component (if applicable):
mksh-40b-2.fc15.x86_64

How reproducible:
Always

Steps to Reproduce:
1. mkdir t && touch t/십일 t/십이
2. Type 'ls t/' and hit <TAB>

Actual results:
t/십�

Expected results:
t/십

Additional info:
This should be reproducible with anything beyond ASCII range with UTF-8.

Revision history for this message
In , Robert (robert-redhat-bugs-1) wrote :

Thorsten, this sounds like something for you as upstream.

Revision history for this message
In , Thorsten (thorsten-redhat-bugs) wrote :

Agreed (thanks for the testcase and bringing it to my attention),
especially as the line editor behaves funnily afterwards… will fix.

Revision history for this message
Thorsten Glaser (mirabilos) wrote :

Committed revision 1004EFCF98104A6DE49.

Changed in mksh:
status: New → Fix Committed
Revision history for this message
In , Thorsten (thorsten-redhat-bugs) wrote :

Created attachment 550003
fix from mksh CVS

fixed upstream, thanks for the report

Revision history for this message
In , Petr (petr-redhat-bugs) wrote :

Works like a charm, thank you for the fix!

Revision history for this message
In , Robert (robert-redhat-bugs-1) wrote :

Petr: Can you try to backport this patch into RHEL 6?

Thorsten: How far is the next mksh release? Shall I wait?

Revision history for this message
In , Thorsten (thorsten-redhat-bugs) wrote :

Robert: probably in 2-3 weeks, depending on the feedback I get for what’s
currently in the CVS branch R40-stable which I uploaded to Debian unstable.
You might want to package that (I just used R40d and a diff between that
and the current head of the R40-stable branch) in the meantime if you can’t
live without this fix. Be aware it contains less tested changes to the per-
sistent history code (which is why I’m reluctant to release now).

See also the recent mails on miros-mksh@ (via GMane)

Revision history for this message
In , Petr (petr-redhat-bugs) wrote :

(In reply to comment #5)
> Petr: Can you try to backport this patch into RHEL 6?

This is a task for its RHEL maintainer, Michal Hlavinka (CC'd already).
I'll clone this bug for RHEL6.

Revision history for this message
Thorsten Glaser (mirabilos) wrote :

fixed in R40e and HEAD

Changed in mksh:
status: Fix Committed → Fix Released
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Petr (petr-redhat-bugs) wrote :

Still present in the current releases.

Revision history for this message
In , Thorsten (thorsten-redhat-bugs) wrote :

Not present in mksh-current. Note you need “set -U”, i.e. Unicode mode enabled.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 16 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Petr (petr-redhat-bugs) wrote :

Works in Fedora 18, finally -- which is good enough for me now.
Closing with my current version.

Changed in mksh (Fedora):
importance: Unknown → Low
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.