Hugs | 28 Nov 11:21 2008

[Hugs] #87: Strange writeFile behaviour

#87: Strange writeFile behaviour
--------------------+-------------------------------------------------------
 Reporter:  guest   |       Owner:  nobody
     Type:  defect  |      Status:  new   
 Priority:  major   |   Milestone:        
Component:  hugs    |     Version:  200609
 Keywords:          |  
--------------------+-------------------------------------------------------
 I don't understand the following behaviour of writeFile in Hugs.  GHCi
 does what I would expect.  Any help would be greatly appreciated!

 Matthew Naylor (`mfn <at> cs.york.ac.uk`)

 {{{
 mfn <at> pc093:/tmp$ ghci
 GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
 Loading package base ... linking ... done.
 Prelude> writeFile "foo.txt" [toEnum 128]
 Prelude> Leaving GHCi.
 mfn <at> pc093:/tmp$ wc -c foo.txt
 1 foo.txt
 mfn <at> pc093:/tmp$ rm foo.txt
 mfn <at> pc093:/tmp$ hugs
 __   __ __  __  ____   ___      _________________________________________
 ||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
 ||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
 ||---||         ___||           World Wide Web: http://haskell.org/hugs

 ||   ||                         Report bugs to: hugs-bugs <at> haskell.org
 ||   || Version: May 2006       _________________________________________

(Continue reading)

Hugs | 28 Nov 11:50 2008

Re: [Hugs] #87: Strange writeFile behaviour

#87: Strange writeFile behaviour
---------------------+------------------------------------------------------
  Reporter:  guest   |       Owner:  nobody
      Type:  defect  |      Status:  new   
  Priority:  major   |   Milestone:        
 Component:  hugs    |     Version:  200609
Resolution:          |    Keywords:        
---------------------+------------------------------------------------------
Comment (by ross):

 Character I/O in Hugs uses the encoding specified by the current locale.
 If chr 128 is being mapped to two bytes, your locale is probably
 specifying UTF-8.  You can set your locale (LC_CTYPE) to use ISO8859-1 if
 desired.  If you want binary output, use writeBinaryFile.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/87#comment:1>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs
Hugs | 28 Nov 12:11 2008

Re: [Hugs] #87: Strange writeFile behaviour

#87: Strange writeFile behaviour
---------------------+------------------------------------------------------
  Reporter:  guest   |       Owner:  nobody
      Type:  defect  |      Status:  new   
  Priority:  major   |   Milestone:        
 Component:  hugs    |     Version:  200609
Resolution:          |    Keywords:        
---------------------+------------------------------------------------------
Comment (by guest):

 Cheers, Neil Mitchell pointed me to openBinaryFile just after I wrote this
 report.  Sorry to be a nuisance.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/87#comment:2>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs
Hugs | 28 Nov 12:15 2008

Re: [Hugs] #87: Strange writeFile behaviour

#87: Strange writeFile behaviour
----------------------+-----------------------------------------------------
  Reporter:  guest    |       Owner:  nobody
      Type:  defect   |      Status:  closed
  Priority:  major    |   Milestone:        
 Component:  hugs     |     Version:  200609
Resolution:  invalid  |    Keywords:        
----------------------+-----------------------------------------------------
Changes (by ross):

  * status:  new => closed
  * resolution:  => invalid

-- 
Ticket URL: <http://hackage.haskell.org/trac/hugs/ticket/87#comment:3>
Hugs <http://www.haskell.org/hugs/>
Hugs 98, an interpreter for Haskell
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs

Gmane