Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geth dumpconfig in Windows PowerShell with Incompatible File Encoding #16383

Closed
msagansk opened this issue Mar 25, 2018 · 2 comments
Closed

Geth dumpconfig in Windows PowerShell with Incompatible File Encoding #16383

msagansk opened this issue Mar 25, 2018 · 2 comments

Comments

@msagansk
Copy link

System information

Geth version: 1.8.2-stable-b8b9f7f4
OS & Version: Windows 10

Expected behaviour

Should be able to dumpconfig in PowerShell and immediately run geth after with that config file.

Actual behaviour

PS C:\Ethereum> geth --datadir "C:\Ethereum" --lightserv 25 --identity Mearix dumpconfig > config.toml
INFO [03-22|20:25:11] Maximum peer count ETH=25 LES=100 total=125
PS C:\Ethereum> geth --config config.toml
Fatal: config.toml, line 1: invalid TOML syntax
PS C:\Ethereum>

Reason

PowerShell defaults to outputting text files in UCS-2 LE BOM. If I change the encoding of the file to ANSI or UTF-8 geth works fine. But from a user experience point of view, geth should be able to read many different text file encoding formats out of the box.

@holiman
Copy link
Contributor

holiman commented Dec 11, 2018

Possible fix, add dumpconfig conf.toml and have geth write to the file, or dumpconfig - to write to stdout

@adamschmideg adamschmideg added this to the Backlog milestone Dec 11, 2018
@karalabe
Copy link
Member

karalabe commented Jan 7, 2019

Fixed by #18327. dumpconfig now accepts an optional filename parameter into which to dump the config on platforms where piping is problematic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants