@@ 267,19 267,19 @@ script_from_string str = tag_from_string $ case titlecase str of
tag_from_string :: String -> Word32
tag_from_string str = case str ++ Prelude.repeat ' ' of
c1:c2:c3:c4:_ -> Prelude.foldl (.|.) 0 [
- shiftL (c2w c1 .&. 0x7) 24,
- shiftL (c2w c2 .&. 0x7) 16,
- shiftL (c2w c3 .&. 0x7) 8,
- shiftL (c2w c4 .&. 0x7) 0
+ shiftL (c2w c1 .&. 0x7f) 24,
+ shiftL (c2w c2 .&. 0x7f) 16,
+ shiftL (c2w c3 .&. 0x7f) 8,
+ shiftL (c2w c4 .&. 0x7f) 0
]
_ -> 0
-- | Converts a "tag" `Word32` into a 4 `Char` `String`.
tag_to_string :: Word32 -> String
tag_to_string tag = [
- w2c (shiftR tag 24 .&. 0x7),
- w2c (shiftR tag 16 .&. 0x7),
- w2c (shiftR tag 8 .&. 0x7),
- w2c (shiftR tag 0 .&. 0x7)
+ w2c (shiftR tag 24 .&. 0x7f),
+ w2c (shiftR tag 16 .&. 0x7f),
+ w2c (shiftR tag 8 .&. 0x7f),
+ w2c (shiftR tag 0 .&. 0x7f)
]
------