Public bug reported:

An UTF-8 character after an Ascii character is misinterpreted. It's
difficult to explain the trouble so I get some commands to actually see
it. Feel free to improve my description.

This test case work on gnome-terminal and xterm only when it is sized
with 80 characters long.

$ echo $PS1 # Default value
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$
$ temp_dirname1=/tmp/$(perl -e 'print "a" x '$(echo 
"80-(${#USER}+${#HOSTNAME}+4)-4" | bc)',"à","a" x 4,"\n"')
$ temp_dirname2=/tmp/$(perl -e 'print "a" x '$(echo 
"80-(${#USER}+${#HOSTNAME}+4)-4" | bc)',"a","a" x 4,"\n"')
$ temp_dirname3=/tmp/$(perl -e 'print "a" x '$(echo 
"80-(${#USER}+${#HOSTNAME}+4)-5" | bc)',"àà","a" x 4,"\n"')
$ echo -e $temp_dirname1"\n"$temp_dirname2"\n"$temp_dirname3 # Look at the 
actual values for these three variables
$ mkdir $temp_dirname1 $temp_dirname2 $temp_dirname3
$ cd $temp_dirname1 # Wrong display
$ cd $temp_dirname2 # Correct display
$ cd $temp_dirname3 # Neither completely correct display neither wrong display 
(there is one space left at the end of the line that doesn't exist)

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: bash 4.2-5ubuntu3
ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3
Uname: Linux 3.11.0-12-generic i686
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: i386
Date: Mon Nov  4 15:04:59 2013
InstallationDate: Installed on 2013-04-22 (195 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release i386 (20130420)
MarkForUpload: True
SourcePackage: bash
UpgradeStatus: Upgraded to saucy on 2013-09-06 (59 days ago)

** Affects: bash (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 saucy

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1247854

Title:
  PS1: wrong display of accentuate character with \w

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1247854/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to