PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → fRead returning only hex 1A characters
fRead returning only hex 1A characters
Débuté par ClaudeHullq, 13 sep. 2022 11:57 - 2 réponses
Membre enregistré
10 messages
Posté le 13 septembre 2022 - 11:57
Using Windev Mobile 27 in an Android app:

nFid is int = fOpen(gsPath+"textfile.txt",foAnsi+foRead)
fSeek(nFid,0,fpBeginning)
s is ANSI string = fRead(nFid,100)
info(s) shows a block of Chinese characters

fSaveText(path+"textfile.txt",s)
shows "..." all hex 1A characters

But in simulator mode the correct text is displayed in info(s).
Is this a flaw in Windev or my Android SDK or what?
Membre enregistré
9 messages
Posté le 29 septembre 2022 - 17:51
Same problem with the WM27.
Membre enregistré
797 messages
Popularité : +40 (42 votes)
Posté le 05 octobre 2022 - 12:27
Hi. The Chinese characters may be for using an ANSI string since in Android and IOS the strings are of Unicode type. That's why in the simulator it looks fine, since on the desktop the strings are ANSI by default. What does it look like when using fLoadText instead of using fopen and fread?

Rubén