codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

XMonad.Prompt.Shell double-encodes with recent ghc #529

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
[29 13:43] <ryanakca> Yes. Running "echo 'àé' > /tmp/foo && hexdump -C 
/tmp/foo" gives "c3 a0 c3 a9 0a" in urxvt under xmonad here, and "echo 'àé' > 
/tmp/foo" via the shell prompt provided by XMonad.Prompt.Shell, followed by 
"hexdump -C /tmp/foo" in urxvt, displays "c3 83 c2 a0 c3 83 c2 a9 0a".

X.P.Shell is explicitly calling encodeUtf8, but the base ghc libraries with 
7.6.1 already do that if $LANG / $LC_ALL is set unless you call the lower level 
versions of these functions.  (Which didn't exist in older versions of base, so 
we can't simply use those instead.)

Original issue reported on code.google.com by allber...@gmail.com on 29 Jan 2013 at 7:08