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

Re: Make Unicode bugs release critical?



Excerpts from Joey Hess's message of Sex Fev 11 13:39:08 -0200 2011:
(...)
> It can be as simple as software written trusting language documentation
> that says "strings are processed in unicode" and doesn't point out all
> the exceptions that can let non-unicode data in. For example, this
> simple haskell program processess a file's content utf-8 cleanly, but
> prints its name like "foö".
> 
> import System.Environment
> main = do
>         args <- getArgs
>         let file = head args
>         putStrLn $ "file is: " ++ file
>         putStr =<< readFile file
> 
> This program has an entirely different failure mode; type in
> "foö" (touch it first), and it will complain that "fo�" doesn't exist.
> 
> main = getLine >>= readFile >>= putStr
> 
> Neither of these failure modes is obvious from any documentation I've seen.
> Both of these programs are something a typical developer would expect to
> work. (Both also have unexpected failure modes when LANG=C.)

http://hackage.haskell.org/trac/ghc/ticket/3307

Greetings.
(...)

Attachment: signature.asc
Description: PGP signature


Reply to: