Garbled file on

I recently published a package on npm.

The readme file appears garbled. But it appears decently on Github.

Can anyone help me fix that?

This is my first npm package.

What’s the file encoding? GH seems to understand utf-16, NPM does not. If not utf-8, change the encoding to utf-8 and republish.

1 Like

^ Yep, it is in UTF-16 LE.

If you use VS Code you can see the encoding in the status bar on the bottom. If you click where it says UTF-16 LE it should open a menu with a “Save with Encoding” option, clicking that will give you a list of encodings to pick from.

1 Like

Thanks a lot :heart: @DanCouper

1 Like

Thanks @lasjorg :heart:,
I just did what you said and it fixed the problem.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.