FS#16648 - [mc] multibyte directory names are displayed incorrectly

Attached to Project: Arch Linux
Opened by Dmytro Bagrii (dimich) - Wednesday, 14 October 2009, 16:21 GMT
Last edited by Dan Griffiths (Ghost1227) - Friday, 12 February 2010, 23:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Aaron Griffin (phrakture)
Roman Kyrylych (Romashka)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
*) incorrect calculation of the number of charachters in prompt (must use mbstrlen() instead of strlen() in load_prompt())
*) incorrect trimming and display of current directory name at the top of panel.

Additional info:
package version: extra/mc 4.6.1-5
I know that midnight-commander team are prepearing 4.7.X version with full utf8 support, but Arch still uses 4.6.1, so I think late is better than never :)

Steps to reproduce:
1) set PS1 variable to show current directory:
$ export PS1="[\u@\h \W]\$ "
2) create directory with multibyte characters:
$ mkdir "Διρεκτορψ ωιτη long Nаме"
3) run mc and enter to the directory

First issue: wrong position of cursor in command prompt
Second issue: wrong trimming of the current directory name at the top of panel

Proposed patch fixes thease issues.
This task depends upon

Closed by  Dan Griffiths (Ghost1227)
Friday, 12 February 2010, 23:56 GMT
Reason for closing:  Fixed
Comment by Tom Killian (tomk) - Thursday, 21 January 2010, 22:34 GMT
Working in mc 4.7.0.1

Loading...