[Hackage] #145: Hackage does not support UTF-8 characters

Hackage trac at galois.com
Thu Feb 21 20:44:18 EST 2008

#145: Hackage does not support UTF-8 characters
  Reporter:  guest          |        Owner:                 
      Type:  defect         |       Status:  new            
  Priority:  normal         |    Milestone:  Cabal-1.4      
 Component:  Cabal library  |      Version:  1.1.6          
  Severity:  normal         |   Resolution:                 
  Keywords:                 |   Difficulty:  easy (<4 hours)
Ghcversion:  6.4.2          |     Platform:                 
Comment (by duncan):

 So to do this properly we have to consider unicode everywhere in the
 .cabal file parser. What is the best strategy?

 Some fields want to be ascii only, like package names, dependencies etc.
 Others are totally free form.

 Probably the right thing to do is to read the .cabal file as utf8 before
 parsing. Then for those fields that should be ascii only we should parse
 as we do now and then do a check afterwards and complain about chars we do
 not allow. That way we get better error messages.

 However if we're decoding from UTF8 then we have the problem that we have
 to re-encode when printing, eg in error messages and when writing files.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/145#comment:2>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list