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

Probleme mit Umlauten unter Windows im Daemon Mode #154

Open
Lemru opened this issue Feb 28, 2025 · 0 comments
Open

Probleme mit Umlauten unter Windows im Daemon Mode #154

Lemru opened this issue Feb 28, 2025 · 0 comments

Comments

@Lemru
Copy link

Lemru commented Feb 28, 2025

Bei der Nutzung des Validators 1.5.0 unter Windows wird ein Stream vom Validator zurückgeliefert, dessen Kodierung nicht eindeutig ermittelbar ist. Sowohl curl als auch Python liefern das gleiche Resultat.

Start des Daemons in der Powershell:

java -jar validator-1.5.0\validationtool-1.5.0-standalone.jar -r xrechnung-3.0.2 -s xrechnung-3.0.2\scenarios.xml -D --disable-gui

Prüfung des Dokuments test.xml mit curl:

cmd /c curl --location --request POST 'http://localhost:8080' --header 'Content-Type: application/xml' --data-binary '@test.xml' > test.html

Prüfung des gleichen Dokuments mit Python:

import requests
with open('test.xml', 'rb') as f: content = f.read()
response = requests.post(
    url='http://localhost:8080',
    headers={'Content-Type': 'application/xml'},
    data=content
).content.decode()
with open('test.html', 'w') as f: f.write(response)

In Python liefert die Prüfung der Kodierung das Ergebnis None. Zu erwarten wäre hier 'utf-8'.

Das Ergebnis ist in beiden Fällen gleich: Umlaute werden durch Sonderzeichen dargestellt.

Unter Linux tritt dieses Problem nicht auf. Sowohl curl als auch Python liefern eine html Datei, die sich im Browser korrekt darstellen läßt.

@Lemru Lemru changed the title Probleme mit Umlauten unter Windows Probleme mit Umlauten unter Windows im Daemon Mode Feb 28, 2025
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

1 participant