Closed TonyKnibb-MakaraHealth closed 1 year ago
Please provide full reproduction code
Your file is being stored in UTF-16, but you are reading it as UTF-8. Are you on Windows, and populated the file using "cmd.exe"?
Your file is being stored in UTF-16, but you are reading it as UTF-8. Are you on Windows, and populated the file using "cmd.exe"?
The file was created via the cmd window in PhpStorm, on Windows 10.
Please provide full reproduction code
Thanks for the reply. Not sure I fully understand the request.
I downloaded and installed Deno on Win 10. I upgraded Deno to latest version 1.32.5 and installed Lume. I ran the command (as it was shown in the cmd output window) to create an md file containing Hello world. I got the above result.
I don't have any other code, as I haven't done anything yet.
This is not a bug in Deno, it is unfortunately just how Windows works (legacy parts of it use UTF-16 instead of UTF-8 like the rest of the world). If you create this file via the PhpStorm editor, it likely won't have this issue. cmd.exe is one of these legacy things that use UTF-16
That seems to have fixed my issue.
Thanks!
I ran
echo 'Hello world' > index.md
which created the file, and populated it with Hello world.Running
deno task serve
results in an html file that's like this:< !DOCTYPE html > < p>��H�e�l�l�o� �w�o�r�l�d�< /p>
[spaces in tags added for formatting here]
Adding anything additional to the md file results in the same thing happening to that too.