[xmonad] spawn functions are not unicode safe
roma at ro-che.info
Thu Jan 15 08:53:49 EST 2009
* Gwern Branwen <gwern0 at gmail.com> [2009-01-14 19:23:30-0500]
> > whats the benefit to maintaining non unicode spawn behavior? is it
> > needlessly complex to have a spawnA and spawnU and then the actual
> > spawn function determines the more appropriate function to use based
> > on the string itself?
> How would it determine that? I don't know that Data.Char.isLatin1 would suffice.
RFC 3629  states:
o UTF-8 strings can be fairly reliably recognized as such by a
simple algorithm, i.e., the probability that a string of
characters in any other encoding appears as valid UTF-8 is low,
diminishing with increasing string length.
However, no references to the algorithm itself are given.
Google brought me this sample algorithm .
Probably it's worth to implement something like that and include into
utf8-string if it's not already there.
Roman I. Cheplyaka (aka Feuerbach @ IRC)
More information about the xmonad