[project @ 2001-08-09 11:32:15 by simonmar]
authorsimonmar <unknown>
Thu, 9 Aug 2001 11:32:15 +0000 (11:32 +0000)
committersimonmar <unknown>
Thu, 9 Aug 2001 11:32:15 +0000 (11:32 +0000)
Oops, only ASCII alphanumeric characters are allowed to be used
unencoded in C identifiers, but Char.isAlphaNum includes ISO-8851
alphanumeric characters.

ghc/compiler/basicTypes/OccName.lhs

index 3cc7372..f7e7c17 100644 (file)
@@ -480,7 +480,9 @@ encodeFS fast_str  | all unencodedChar str = fast_str
 unencodedChar :: Char -> Bool  -- True for chars that don't need encoding
 unencodedChar 'Z' = False
 unencodedChar 'z' = False
-unencodedChar c   = ISALPHANUM c
+unencodedChar c   =  c >= 'a' && c <= 'z'
+                 || c >= 'A' && c <= 'Z'
+                 || c >= '0' && c <= '9'
 
 encode_ch :: Char -> EncodedString
 encode_ch c | unencodedChar c = [c]    -- Common case first