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
|
||||
lhs_log::Out("TBD:"+TBD)
|
||||
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>"
|
||||
*Text = AllocateMemory(StringByteLength(Text))
|
||||
PokeS(*Text, Text)
|
||||
ContentData = URLDecoder(ContentData, #PB_UTF8)
|
||||
Text = ~"<html lang=\"de\">" +
|
||||
"<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))
|
||||
Encoded = Base64Encoder(*Text, MemorySize(*Text))
|
||||
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
|
||||
EndIf
|
||||
Text = Phpresult
|
||||
*Text = AllocateMemory(StringByteLength(Text))
|
||||
PokeS(*Text, Text)
|
||||
*Text = AllocateMemory(StringByteLength(Text, #PB_UTF8))
|
||||
PokeS(*Text, Text, -1, #PB_UTF8)
|
||||
lhs_log::Out("Unencoded:"+PeekS(*Text, -1 , #PB_UTF8))
|
||||
Encoded = Base64Encoder(*Text, MemorySize(*Text))
|
||||
lhs_log::Out("Encoded: " + Encoded)
|
||||
|
|
Loading…
Reference in a new issue