Skip to content

error in generating files with None English characters in it. #173

@platoali

Description

@platoali

Describe the bug

I have in my routes, files with persian characters in them. for example :

photo/2021-08-16___پشت کریمخانی.html
The site is OK in live server. but it refuses to generate these files in files system.

here is my prism'

prism'
        (\photo -> "photo/" <> showDay (phDate photo)
          <> "___" <> phTitle photo
          <> ".html")
        (\path -> do
          p <- stripPrefix "photo/" path
          index <- extractTitleDate p
          lookup index  $ modelPhotos m)

when I try to generate the site:

❯ nix build .#site

> [Info#ema.generate] W /nix/store/xf217fn6icapqiacvkckzv1247v5wsf6-site/photo/2021-08-16___پشت کریمخانی.html
> ema-template: /nix/store/xf217fn6icapqiacvkckzv1247v5wsf6-site/photo/2021-08-16___ .html: withBinaryFile: invalid argument (cannot encode character '\1662')

To Reproduce
Steps to reproduce the behavior:

  1. have a file name with none English characters
  2. try to generate with nix build .#site
  3. it refuses to generate html file.

Expected behavior
it should generate file with none English characters.

Desktop (please complete the following information):

  • linux
  • hyprland
  • firefox
  • nixos

Additional context
site is Ok when tested on live server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions