Permalink
Browse files

Fix utf8 encoder bug in 0.1 branch

  • Loading branch information...
1 parent 7eb6e32 commit c91c1da6170c585bd158e35ce7e447a2f4a4f315 @jaspervdj committed Jul 7, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 blaze-html.cabal
  2. +1 −1 src/Text/Blaze/Internal/Utf8Builder.hs
View
@@ -7,7 +7,7 @@ Name: blaze-html
-- The package version. See the Haskell package versioning policy
-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
-- standards guiding when and how versions should be incremented.
-Version: 0.1
+Version: 0.1.1
-- A short (one-line) description of the package.
Synopsis: A blazingly fast HTML combinator library.
@@ -201,7 +201,7 @@ encodeCharUtf8 :: (Word8 -> a) -- ^ 1-byte UTF-8.
-> Char -- ^ Input 'Char'.
-> a -- ^ Result.
encodeCharUtf8 f1 f2 f3 f4 c = case ord c of
- x | x <= 0xFF -> f1 $ fromIntegral x
+ x | x <= 0x7F -> f1 $ fromIntegral x
| x <= 0x07FF ->
let x1 = fromIntegral $ (x `shiftR` 6) + 0xC0
x2 = fromIntegral $ (x .&. 0x3F) + 0x80

0 comments on commit c91c1da

Please sign in to comment.