bug-bash
[Top][All Lists]
Advanced

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

Re: set -x prejudiced; won't smell UTF-8 coffee


From: Mike Frysinger
Subject: Re: set -x prejudiced; won't smell UTF-8 coffee
Date: Wed, 8 Apr 2009 02:50:45 -0400
User-agent: KMail/1.11.1 (Linux/2.6.28; KDE/4.2.1; x86_64; ; )

On Wednesday 08 April 2009 02:29:17 jidanni@jidanni.org wrote:
> Instead of having bash make judgements about what people want from their
> personal mix of:
> $ locale|sed 's/.*=//;s/"//g;/^$/d'|sort|uniq -c
>       2 C
>      11 zh_TW.UTF-8

locale variables have pretty clear definitions.  obviously LC_COLLATE wouldnt 
be relevant here, but LC_MESSAGES certainly would.

> instead just have a passthru option they could enable, that says "I
> hereby agree that I want to be sent raw -x output back, and if it looks
> weird, it's my own fault, 'garbage in, garbage out'."

your definition of 'garbage' is pretty loose.  you also ignore know non-
printable characters like the first ~30 characters in the ascii table.  those 
should never be printed directly.

> In fact I forgot at the moment why they would see garbage.

not every multibyte sequence is valid and thus will not map to a valid 
character.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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