> Date: Wed, 26 Jul 2023 17:32:03 +0200
> From: tlaro...@polynum.com
> 
> If setting LC_CTYPE to this:
> 
> $ export LC_CTYPE=fr_FR.ISO8859-15
> 
> and then:
> 
> $ echo "éé" | sed 's/é/\é/g'
> sed: 1: "s/é/\é/g": RE error: trailing backslash (\)
> 
> Where does the program manage to find a backslash i.e. 0134? While
> 'é' is 0351.

Exactly what bytes are passed as an argument to sed?  Can you write a
program that will hexdump argv[1] and pass the same argument to it?

Next step, if that reveals the expected 0xe9, is to find exactly what
string is passed to regcomp inside sed.

Reply via email to