[Haskell-cafe] writeFile: commitBuffer: invalid argument (Illegal byte sequence)

dokondr dokondr at gmail.com
Sun Dec 4 19:13:51 CET 2011


Is there any other way to solve this problem without changing LANG
environment variable?

On Sun, Dec 4, 2011 at 8:27 PM, Erik Hesselink <hesselink at gmail.com> wrote:

> What is the value of your LANG environment variable? Does it still
> give the error if you set it to e.g. "en_US.UTF-8"?
>
> Erik
>
> On Sun, Dec 4, 2011 at 13:12, dokondr <dokondr at gmail.com> wrote:
> > Correct url of a "bad" string:
> >
> http://twitter.com/#!/search/Hoping%20You%20Have%20A%20iPhone%20When%20I%20Do%20This%20lang%3Aen<http://twitter.com/#%21/search/Hoping%20You%20Have%20A%20iPhone%20When%20I%20Do%20This%20lang%3Aen>
> >
> >
> > On Sun, Dec 4, 2011 at 3:08 PM, dokondr <dokondr at gmail.com> wrote:
> >>
> >> Hi,
> >> In  GHC 7.0.3 / Mac OS X when trying to:
> >>
> >> writeFile  "someFile" "(Hoping You Have A iPhone When I Do This) Lol
> Sleep
> >> Is When You Close These ---&gt; \55357\56384"
> >>
> >> I get:
> >> commitBuffer: invalid argument (Illegal byte sequence)
> >>
> >> The string I am trying to write can also be seen here:
> >>
> >>
> http://twitter.com/#!/search/Hoping%20You%20Have%20A%20iPhone%20When%20I%20Do%20This%20lang%3Aen<http://twitter.com/#%21/search/Hoping%20You%20Have%20A%20iPhone%20When%20I%20Do%20This%20lang%3Aen>
> >>
> >> It looks like 'writeFile' can not write unicode characters.
> >> Any workarounds?
> >>
> >> Thanks!
> >> Dmitri
> >>
> >>
> >
> >
> >
> >
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111204/d127221a/attachment.htm>


More information about the Haskell-Cafe mailing list