Skip to content

[docs] Add note to installation instructions about PowerShell defaulting to UTF-16 #11751

@humphd

Description

@humphd

The installation docs make the following suggestion for creating an empty prettier config file:

echo {}> .prettierrc.json

This is a useful suggestion in most cases, but breaks for people using Windows and PowerShell, which "uses the Unicode UTF-16LE encoding by default".

I gave students a lab this week, and asked them to set up prettier. A number of them struggled with errors that they couldn't make sense of--all of them were encoding related, and all of the people affected were on Windows and PowerShell.

It looks like this has been discussed in the past, but the suggestions then seem to be "convert the file to UTF8."

I wonder if it would be better to suggest another method for doing this (there's nothing sacred about using the echo style above) and/or add a note about PowerShell and the need for UTF8 in JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions