[xmonad] why spawn (and safeSpawn, etc) use encodeString?

Brandon Allbery allbery.b at gmail.com
Fri Apr 17 20:23:38 UTC 2020


In 2020 my inclination is to encode if it has codepoints > 255 in it and
leave it on the user otherwise; it's impossible to guess the right action.

On Fri, Apr 17, 2020, 16:05 Platon Pronko <platon7pronko at gmail.com> wrote:

> Unfortunately I do not have access to many different systems - only the
> one I use now, Arch Linux. So I won't be able to test it thoroughly. But as
> a data point - on my machine Prompt returns UTF8 and that UTF8 can be
> safely passed into the executeFile call, without encodeString.
>
> Best regards,
> Platon Pronko
>
> On 2020-04-17 22:37, Gwern Branwen wrote:
> > As one of the people responsible for that, the backstory is that at
> > the time very long ago (2008?), it wasn't clear how to handle Unicode
> > text in a cross-distro bugfree way while passing through a Haskell
> > library like XMonad from a Prompt into X11 or the shell or
> > applications, no one had the appetite to make an in-depth study of the
> > various systems to figure out what exactly had to be done to handle
> > ASCII & Unicode in a way that would be safe everywhere, and
> > `encodeString` seemed to sorta work in most cases and be better that
> > what came before.
> >
> > Since the Haskell and other ecosystems have gradually continued
> > evolving (one hopes), it's possible that many Unicode-related issues
> > have since quietly vanished, and XMonad could do something simpler and
> > more correct than it does now; but one would need to investigate
> > thoroughly on a couple systems before one could be sure it was safe to
> > update `spawn` and all downstream users of `encodeString` etc, and no
> > one has been willing to do so to the extent to make a change in the
> > (generally very stable) HEAD.
> >
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20200417/b144f41e/attachment.html>


More information about the xmonad mailing list