Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 9 Monaten, 4 Wochen
Letzter Beitrag:
vor 9 Monaten, 4 Wochen
Beteiligte Autoren:
PETER ZHOU, Fabrice Harari

[WM20] HTTPGetResult works well in simulator only

Startbeitrag von PETER ZHOU am 14.02.2017 17:22

Hi,

In the WM20 android simulator, the AnsiToUnicode(HTTPGetResult) is working well (getting the correct result), but when come to deploy on the android device, it's showing as empty string (no result).

Anybody know the issue ?

Regards,

PETER ZHOU

Antworten:

Hi

by default, in in the simulator, non specified strings and functions results are ANSI.
On a device, they are unicode.
On IOS, it's even worse than that (there's some utf8 in the middle)

So, that's the issue, and your code (you know, the one you are NOT showing us) is not managing it correctly.

Best regards

von Fabrice Harari - am 14.02.2017 18:18
Quote
Fabrice Harari
Hi

by default, in in the simulator, non specified strings and functions results are ANSI.
On a device, they are unicode.
On IOS, it's even worse than that (there's some utf8 in the middle)

So, that's the issue, and your code (you know, the one you are NOT showing us) is not managing it correctly.

Best regards


It seems that if i made the http request return a shorter string, then it works on both simulator and device.

looks like somehow android can take certain number of chars.

Regards,

PETER ZHOU

von PETER ZHOU - am 15.02.2017 07:54
So that would mean that you are doing a httprequest in GET mode.

For long data, it's best to work in POST mode (as I'm doing in wxReplication, where I need to manage big packets of data)

Best regards

von Fabrice Harari - am 15.02.2017 09:59
Quote
Fabrice Harari
So that would mean that you are doing a httprequest in GET mode.

For long data, it's best to work in POST mode (as I'm doing in wxReplication, where I need to manage big packets of data)

Best regards


I actually doing the httprequest in POST mode.
I will also be checking out your wxReplication source.

Regards,

PETER ZHOU

von PETER ZHOU - am 15.02.2017 13:53
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.