Use UTF-32LE instead of UTF32LE
authorSimon Marlow <marlowsd@gmail.com>
Tue, 6 Oct 2009 10:02:07 +0000 (10:02 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 6 Oct 2009 10:02:07 +0000 (10:02 +0000)
The latter is not recognised by some iconv implementations.

GHC/IO/Encoding/Iconv.hs

index 1f20af2..8ef87c9 100644 (file)
@@ -128,11 +128,11 @@ foreign import ccall unsafe "localeEncoding"
 
 haskellChar :: String
 #ifdef WORDS_BIGENDIAN
-haskellChar | charSize == 2 = "UTF16BE"
-            | otherwise     = "UTF32BE"
+haskellChar | charSize == 2 = "UTF-16BE"
+            | otherwise     = "UTF-32BE"
 #else
-haskellChar | charSize == 2 = "UTF16LE"
-            | otherwise     = "UTF32LE"
+haskellChar | charSize == 2 = "UTF-16LE"
+            | otherwise     = "UTF-32LE"
 #endif
 
 char_shift :: Int