diff options
| author | bjorn <bjorn@bringert.net> | 2008-08-22 09:47:42 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-08-22 09:47:42 +0000 |
| commit | 52af19bd64ea39fbf8552601e94d47983a75497e (patch) | |
| tree | 30e9a961f4464f207d1b8ce9c4c05a6755d3380f | |
| parent | b6785df0d2d3811920c7212f7a0d75b40d1d0db2 (diff) | |
UTF8 encode all generated XML.
| -rw-r--r-- | src/GF/Data/XML.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/GF/Data/XML.hs b/src/GF/Data/XML.hs index 0c2efb7dc..4b3a9b509 100644 --- a/src/GF/Data/XML.hs +++ b/src/GF/Data/XML.hs @@ -7,6 +7,7 @@ module GF.Data.XML (XML(..), Attr, comments, showXMLDoc, showsXMLDoc, showsXML, bottomUpXML) where import GF.Data.Utilities +import GF.Text.UTF8 data XML = Data String | CData String | Tag String [Attr] [XML] | ETag String [Attr] | Comment String | Empty deriving (Ord,Eq,Show) @@ -20,7 +21,7 @@ showXMLDoc :: XML -> String showXMLDoc xml = showsXMLDoc xml "" showsXMLDoc :: XML -> ShowS -showsXMLDoc xml = showString header . showsXML xml +showsXMLDoc xml = encodeUTF8 . showString header . showsXML xml where header = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" showsXML :: XML -> ShowS |
