bug-bash
[Top][All Lists]
Advanced

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

Re: Right behavior of -x option?


From: Chet Ramey
Subject: Re: Right behavior of -x option?
Date: Thu, 22 May 2008 11:26:47 -0400

> In RH bugzilla we have open bug impeaching right behavior of -x option.
> Reporter is using japanese environment and is trying:
> 
> bash -x -c "echo \"あいうえお\""
> 
> echoing any japanese sentence.
> 
> and bash write out:
> + echo $'\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212'
> sentence in octal digits.
> 
> He is arguing that -x turn on debugmode and wants to see readable japanese 
> sentence.
> 
> My opinion is that -x isn't debugmode and this is right behavior. I think 
> there must be any reason why the echo is called with octal digits, but I 
> really don't know why?

The purpose of -x is to display an execution trace.  The bash implementation
quotes the output for convenient reuse as input.  In this case, it goes for
locale-independence.

I'm not inclined to change the current behavior.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://tiswww.tis.case.edu/~chet/




reply via email to

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