PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Android Export-Create text unicode
Android Export-Create text unicode
Débuté par Mister TRIANTAFILLOS, 14 fév. 2018 18:31 - 2 réponses
Membre enregistré
30 messages
Posté le 14 février 2018 - 18:31
I try to save unicode text file in android but allways show non unicode chars ok and unicode chars as symbols.
this is my code .

MyTextString is UNICODE string = "test e??????? unicode" + CR + "Using fSaveText test"
fSaveText("/data/sorage0/document.txt", MyTextString)


i try and with fOpen and fWrite - fWriteLine but same proble
FileID = fOpen("/data/sorage0/document.txt", foReadWrite)
IF FileID <> -1 THEN
fWriteLine(FileID, "MyTextString )


and i try to export and in pdf but not support unicode chars in android.

Anyone have suggestions ?
Posté le 14 février 2018 - 20:17
Hi

what you are describing

I try to save unicode text file in android but allways show non unicode
chars ok and unicode chars as symbols. this is my code .


seems to indicate the the writing part is correct, and does indeed
create a unicode file, but that you are reading/displaying it in an ansi
field (or equivalent)

As you are not showing us HOW you read the resulting file, I can't be
sure, but that's where I would look

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com




MyTextString is Unicode string = "τεστ ελληνικά unicode" + CR + "Using
fSaveText τεστ"
fSaveText("/data/sorage0/document.txt", MyTextString)


i try and with  fOpen  and fWrite - fWriteLine   but same proble
FileID = fOpen("/data/sorage0/document.txt", foReadWrite)
IF FileID <> -1 THEN
fWriteLine(FileID, "MyTextString )


and i try to export and in pdf but not support unicode chars in android.
Anyone have suggestions ?
Membre enregistré
30 messages
Posté le 15 février 2018 - 12:24
i transfer the file to windows pc and opened with text pad to be sure if viewer support unicode, in fille "save as" show as unicdoe.
However i try this code bellow and finaly in windows i can read the fille... ( in fille "save as" in text pad now show fille as ANSI)

fSaveText((CompleteDir(SysDirStorageCard()) + "\document_ansi.txt"),UnicodeToAnsi(textto_print,charsetGreek))