Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   THTTPRIO wsdl utf-16 (https://www.delphipraxis.net/210047-thttprio-wsdl-utf-16-a.html)

Edelfix 22. Feb 2022 09:54

THTTPRIO wsdl utf-16
 
Hallo,

es geht um folgendes Problem.

Ich habe eine wsdl datei importiert. Funktioniert ganz gut.

Im HTTPRIO1.OnBeforeExecute Event sehe ich das der XML Request als erste Zeile "<?xml version="1.0" encoding="utf-16" standalone="no"?>" hat.

Wie kann ich es auf utf-8 ändern?

Folgendes hat nicht geholfen:

Delphi-Quellcode:
    HTTPRIO1.Converter.Options := HTTPRIO1.Converter.Options + [soUTF8InHeader];
    HTTPRIO1.HTTPWebNode.UseUTF8InHeader := true;

Union 22. Feb 2022 13:41

AW: THTTPRIO wsdl utf-16
 
Du könntest den Stream patchen mit Utf-16, wenn Du eh schon ein OnBeforeExecute verwendest. Du musst aber sicherstellen, dass die XML-Daten dann auch utf-16 sind.

Papaschlumpf73 22. Feb 2022 16:06

AW: THTTPRIO wsdl utf-16
 
Probiere mal:

Delphi-Quellcode:
HTTPRIO1.Converter.Encoding:='UTF-8';
HTTPRIO1.HTTPWebNode.UseUTF8InHeader:=true;

Edelfix 28. Feb 2022 09:30

AW: THTTPRIO wsdl utf-16
 
Super. Das ist die Lösung.

Vielen Dank.


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:19 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz