tech-userlevel archive

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

Re: sed(1) and LC_CTYPE

> $ export LC_CTYPE=fr_FR.ISO8859-15

> $ echo "éé" | sed 's/é/\é/g'
> sed: 1: "s/é/\é/g": RE error: trailing backslash (\)

I agree that's broken.

> Since, to my knowledge, we do not support anything via iconv or
> whatever, shouldn't we assume simply a string of bytes \`a la C, that
> is:

Seems to me there's a deeper problem.  Even if something like iconv
_were_ available, fr_FR.ISO8859-15 is a single-octet character set, so

> -	(void) setlocale(LC_ALL, "");
> +	(void) setlocale(LC_ALL, "POSIX");

should, it seems to me, make no difference.  Am I misunderstanding?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index