Error: ".../config.toml:1:1"unmarshal failed: toml: invalid character at start of key: ÿ

Hello everyone!
I’m working on Quick Start: command Start Hugo’s development server to view the site.
Everything is going on fluently, but at last step, there is a error. I can’t find any topic that same as mine.
Either I use the example theme Ananke, or I use what I want set theme PaperMod, they’re all out of order.

The whole error:Error: "D:\hugo\test\config.toml:1:1": unmarshal failed: toml: invalid character at start of key: ÿ
Thx much for answering my question and sry about my poor English!

Please post your config.toml file.

just theme = 'PaperMod', but I had tried setting other features like: baseURL, title, languageCode

Oh, I recover it by reopening config.toml in ‘utf-8’, and I find something incredible. There’re some gibberishes in my config.toml. Then I delete them and it works finanlly.
But I still don’t know why these gibberishes could exist in my config.toml, so can we divert the problem to it?
Thx a lot!

Are you a Windows user?

Oh, yes

https://gohugo.io/getting-started/quick-start/#commands

If you are a Windows user, you must run these commands with PowerShell. You cannot use Windows Powershell, which is a different application, or the Command Prompt. You may also use a Linux shell if available.

I suspect that you used Windows Powershell, which produces UTF-16 LE.

1 Like

that’s why, i got it.
Thx a lot!

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