> 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    [EMAIL PROTECTED]    http://tiswww.tis.case.edu/~chet/


Reply via email to