[Bug 1247854] Re: PS1: wrong display of accentuate character with \w

Aymeric PETIT mulx at aplu.fr
Mon Nov 4 14:29:24 UTC 2013


I confirm this bug, using lxterminal on Ubuntu Precise.
I've added a screenshoot of the second example to make it more obvious. 

** Changed in: bash (Ubuntu)
       Status: New => Confirmed

** Attachment added: "bug1247854.png"
   https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1247854/+attachment/3899926/+files/bug1247854.png

** Tags added: precise

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

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

Status in “bash” package in Ubuntu:
  Confirmed

Bug description:
  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)

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



More information about the foundations-bugs mailing list