Skip to content

Windows UTF-8 Handling and Files Formatting #140

@Xingye-Dujing

Description

@Xingye-Dujing
  1. Windows UTF-8 support

I am developing in a Chinese locale on Windows 11 (25H2) using the terminal to run ghci and build this project. I encountered garbled characters and build errors because the terminal does not default to UTF-8 support.

For instance, in the error messages below, the characters are not rendered correctly:

Image

Additionally, building the project results in the following error:

Image

As a workaround, one can either run chcp 65001 before executing ghci and cabal run site -- build, or permanently enable the Beta: Use Unicode UTF-8 for worldwide language support option.

I am unsure how widespread this issue is among Windows users. Therefore, I would like to ask if it would be beneficial to add a note in the Ready, Set, Go! section of https://learnyouahaskell.github.io/starting-out.html to warn Windows users about this potential problem.

Furthermore, do you think it is necessary to include a specific reminder for Windows users in the README.md file as well?

  1. Regarding the Makefile file, indentation is currently done using tabs, whereas we typically use four spaces. To maintain consistency with the site.hs conventions, I suggest aligning the indentation style.

  2. The html, js, and css files in this project appear somewhat disorganized, particularly default.html. I think they should be properly formatted.

Which of the above issues do you consider necessity for improvement? If deemed necessary, I am happy to submit a PR to implement these changes.

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