[Hackage] #767: Highlighted source code on hackage.haskell.org mangles Unicode

Hackage cvs-ghc at haskell.org
Fri Nov 19 04:42:05 EST 2010


#767: Highlighted source code on hackage.haskell.org mangles Unicode
----------------------------------+-----------------------------------------
  Reporter:  andersk              |        Owner:           
      Type:  defect               |       Status:  new      
  Priority:  normal               |    Milestone:  HackageDB
 Component:  hackageDB website    |      Version:           
  Severity:  normal               |     Keywords:           
Difficulty:  very easy (<1 hour)  |   Ghcversion:           
  Platform:                       |  
----------------------------------+-----------------------------------------
 On hackage.haskell.org, when you browse the source of a module that
 contains Unicode (e.g. [http://hackage.haskell.org/packages/archive/base-
 unicode-symbols/latest/doc/html/src/Data-Eq-Unicode.html
 Data.Eq.Unicode]), it is sent with a `Content-Type: text/html` header with
 no charset.  There is a charset in the XML declaration `<?xml
 version="1.0" encoding="UTF-8"?>`, but that is ignored by Firefox because
 of the non-XML `Content-Type`.  Therefore, the wrong encoding is detected
 and the Unicode symbols get mangled.

 Possible fixes include sending `Content-Type: text/html; charset=UTF-8`,
 or sending `Content-Type: application/xhtml+xml` so that the XML
 declaration is respected , or both (`Content-Type: application/xhtml+xml;
 charset=utf-8`), or adding equivalent `<meta http-equiv="Content-Type">`
 tags.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/767>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects



More information about the cabal-devel mailing list