Skip to content

0.9.6.4, defaultIndexGenerator doesn't properly show file if its name contains Russian letters #225

Description

@alogic0

Detected on Debian, Ubuntu, locale en_US.UTF-8. More precisely, it fails on characters in range \1024 - \1151, because T.decodeUtf8 thinks it is correct UTF-8 sequence. Problem is here
https://github.com/snapframework/snap-core/blob/0.9-stable/src/Snap/Util/FileServe.hs#L355
Example:

cpp -E FileServe.hs > tmp.hs
ghci tmp.hs
ghci> T.decodeUtf8 $ S.pack "йфыяхъ"
"9DKOEJ"

It must be exeption, but it isn't like in the case of Latin symbols:

ghci> T.decodeUtf8 $ S.pack "üéî"
"*** Exception: Cannot decode byte '\xfc' ...

So we need just do T.pack on such strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions