Bugfixes UTF8 Encoding...
This commit is contained in:
parent
a78508440f
commit
3a7183a391
1 changed files with 9 additions and 5 deletions
|
@ -121,9 +121,13 @@ Procedure.s Formular_Test(Map Header.s(), ContentData.s)
|
||||||
Wend
|
Wend
|
||||||
lhs_log::Out("TBD:"+TBD)
|
lhs_log::Out("TBD:"+TBD)
|
||||||
lhs_log::Out("contentData:"+ContentData)
|
lhs_log::Out("contentData:"+ContentData)
|
||||||
Text = "<!DOCTYPE html><html><header><title>Alle Client Headers</title></header><body>"+TBD+"<hr/><br/><h1>ConentJSON</h1><br/>"+ContentData+"</body></html>"
|
ContentData = URLDecoder(ContentData, #PB_UTF8)
|
||||||
*Text = AllocateMemory(StringByteLength(Text))
|
Text = ~"<html lang=\"de\">" +
|
||||||
PokeS(*Text, Text)
|
"<head>" +
|
||||||
|
~"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>" +
|
||||||
|
"<title>Alle Client Headers</title></header><body>"+TBD+"<hr/><br/><h1>ConentJSON</h1><br/>"+ContentData+"</body></html>"
|
||||||
|
*Text = AllocateMemory(StringByteLength(Text, #PB_UTF8))
|
||||||
|
PokeS(*Text, Text, -1, #PB_UTF8)
|
||||||
lhs_log::Out("Unencoded:"+PeekS(*Text, -1 , #PB_UTF8))
|
lhs_log::Out("Unencoded:"+PeekS(*Text, -1 , #PB_UTF8))
|
||||||
Encoded = Base64Encoder(*Text, MemorySize(*Text))
|
Encoded = Base64Encoder(*Text, MemorySize(*Text))
|
||||||
lhs_log::Out("Encoded: " + Encoded)
|
lhs_log::Out("Encoded: " + Encoded)
|
||||||
|
@ -155,8 +159,8 @@ Procedure.s Php_Test(Map Header.s(), ContentData.s)
|
||||||
CloseProgram(Php) ; Schließt die Verbindung zum Programm
|
CloseProgram(Php) ; Schließt die Verbindung zum Programm
|
||||||
EndIf
|
EndIf
|
||||||
Text = Phpresult
|
Text = Phpresult
|
||||||
*Text = AllocateMemory(StringByteLength(Text))
|
*Text = AllocateMemory(StringByteLength(Text, #PB_UTF8))
|
||||||
PokeS(*Text, Text)
|
PokeS(*Text, Text, -1, #PB_UTF8)
|
||||||
lhs_log::Out("Unencoded:"+PeekS(*Text, -1 , #PB_UTF8))
|
lhs_log::Out("Unencoded:"+PeekS(*Text, -1 , #PB_UTF8))
|
||||||
Encoded = Base64Encoder(*Text, MemorySize(*Text))
|
Encoded = Base64Encoder(*Text, MemorySize(*Text))
|
||||||
lhs_log::Out("Encoded: " + Encoded)
|
lhs_log::Out("Encoded: " + Encoded)
|
||||||
|
|
Loading…
Reference in a new issue