[Haskell-cafe] Filename encoding error (was: Perform a research a la
Unix 'find')
Yves Parès
limestrael at gmail.com
Sun Aug 22 13:23:03 EDT 2010
In fact the encoding problem is more general.
When I simply do 'readFile "bar/fooé"', then I'm told:
*** Exception: bar/fooé: openFile: does not exist (No such file or
directory)
How am I supposed to read files whose names contains non-ASCII characters?
(I use GHC 6.12.3 under Ubuntu 10.04 32bits)
---------- Forwarded message ----------
From: Yves Parès <limestrael at gmail.com>
Date: 2010/8/22
Subject: Re: [Haskell-cafe] Perform a research a la Unix 'find'
To: Magnus Therning <magnus at therning.org>
Cc: haskell-cafe at haskell.org
I looked at both, and I have encoding issues with both.
My locale is fr_FR.utf8
For instance, with HSH:
I have a 'bar' directory, containing a file 'fooé'
run $ "find bar" :: IO [String]
returns me : ["bar", "bar/foo*\233*"]
and run $ "find bar -name fooé"
returns []
When I provoke an error by running:
run $ "find fooé"
it says :
find: "foo*\351*": No file or directory
So it is not the same encoding!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100822/84e05fd5/attachment.html
More information about the Haskell-Cafe
mailing list