Invalid bytes preceding JSON output in PowerShell #218
Unanswered
svsc49
asked this question in
Help / Question
Replies: 1 comment
-
I think the problem is the byte-order-mark (BOM) character that Windows Powershell prepends as first character when writing content into a file. That messes up the data for other programs that expect UTF-8 input, so therefore you see a scrambled character at the beginning of the text stream. I’m not very familiar with Windows or Powershell, but maybe this StackOverflow thread is helpful to resolve the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. A very good and beautiful program and I enjoy working with it. Thank you for making it available free of charge.
However, I keep having a problem when creating the JSON using PowerShell. I use "| out-file intern.json" or "> intern.json". Then I open the JSON and Firefox gives me the answer that "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" The first two characters are question marks in a triangle. If I manually copy the text from PowerShell and build a JSON with it, then it works.
+--- Screenshots ---+
+--- German text below ---+
Hallo. Ein sehr gutes und schönes Programm und ich habe Freude damit zu arbeiten. Vielen Dank für die kostenfreie Zurverfügungstellung.
Ich habe allerdings immer wieder ein Problem, beim Erstellen der JSON durch PowerShell. Dabei nutze ich "| out-file intern.json" oder "> intern.json". Dann öffne ich die JSON und Firefox gibt mir die Antwort, dass "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" Die beiden ersten Zeichen sind Fragezeichen in einem Dreieck. Wenn ich den Text aus PowerShell händisch herauskopiere und damit eine JSON baue, dann funktioniert es.
Beta Was this translation helpful? Give feedback.
All reactions