[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accents

From: Thomas De Contes
Subject: Re: accents
Date: Tue, 10 May 2011 04:47:29 +0200

Le 9 mai 2011 à 20:21, Greg Wooledge a écrit :

> On Mon, May 09, 2011 at 04:46:14PM +0200, Thomas De Contes wrote:
>> Description:
>> 1
>> when i do
>> PS1="&# $PS1"
>> then I have problems since there is some accents in my command lines :
> What is the value of PS1 before you prepend ampersand-hash-space to it?

tDeContes-fixe:~ thomas$ echo "$PS1"
+ echo '\h:\W \u\$ '
\h:\W \u\$ 
tDeContes-fixe:~ thomas$ bash
+ bash
bash-4.2$ set -x
bash-4.2$ echo "$PS1"
+ echo '\s-\v\$ '

the 1st bash is a login shell
in both case (login shell or not), i have the same behavior (without/with 

> What does the ampersand-hash-space have to do with the problem?

if i do not
PS1="&# $PS1"
then i don't have the problem described in 1

>> i heard that you had the problem without having to do
>> PS1="&# $PS1"
>> and that you corrected it in that case
> Who's "you"?

bash's maintainers ("you corrected it")

Somebody told me about corrected bugs that looked like mine :
(i give you the links for info, but it's too difficult for me to understand all 
of that)

>> 2
>> without doing
>> PS1="&# $PS1"
>> i don't have problem when there is just one accent on a small line, but i 
>> have a lot of them when the command line is larger than the terminal and is 
>> displayed on several lines in the terminal
> At first glance this looks like the classic "I have colors in my prompt
> and I forgot to put \[ \] in the right places",

i don't use colors, at least i don't see them and i don't want them in my 

What do you think about my PS1 ?
Is there something else important about colors ?

> but it's hard to be sure
> because the description is so confusing.

happy to help you to help me :-)

>> Repeat-By:
>> make a file and give it a name containing an accent
> In what locale?  UTF-8, ISO-8859-1, or what?

i think that all the system works with UTF-8, and that it is the default 
encoding in nearly all the applications, now

> Is the accented character
> a single-byte character, or a multi-byte character, in your locale?

a multi-byte character, i think
How to confirm that ?

>> 1
>> - execute
>> PS1="&# $PS1"
>> - drag & drop the file with the accent
>> - use "top arrow" and "bottom arrow" to move in the history :
>> at each time you move on the line containing an accent, it eats one character
> I did this in an ISO-8859-1 locale and did not reproduce the problem.
> Then I did it on a UTF-8 locale (differet computer) and also did not
> reproduce the problem.  Granted, I'm controlling the UTF-8 X session
> from the mouse and keyboard that are on the ISO-8859-1 machine, but
> od -t x1 tells me that the file name I created on the UTF-8 machine
> has a multi-byte character in it, so I'm not sure what is required
> to reproduce the issue.

i heard that mac os x and linux both use UTF-8 for their file system, but not 
"the same UTF-8" (that causes problems when sharing external hard disks, for 

How to know exactly which characters I put in my terminal, to allow you to do 
the same in your ?

Oh, i've found that, tell me if it's wrong :
$ echo /Users/thomas/Downloads/réz | h
+ echo $'/Users/thomas/Downloads/re?\201z'
+ hexdump -C
00000000  2f 55 73 65 72 73 2f 74  68 6f 6d 61 73 2f 44 6f  |/Users/thomas/Do|
00000010  77 6e 6c 6f 61 64 73 2f  72 65 cc 81 7a 0a        |wnloads/re..z.|

thank you for the feed back, i hope we'll find what's wrong :-)

Téléassistance / Télémaintenance
(adresse temporaire)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]