PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV Mobile 2024 → Android Export-Create text unicode
Android Export-Create text unicode
Started by Mister TRIANTAFILLOS, Feb., 14 2018 6:31 PM - 2 replies
Registered member
30 messages
Posted on February, 14 2018 - 6:31 PM
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 ?
Posted on February, 14 2018 - 8:17 PM
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 ?
Registered member
30 messages
Posted on February, 15 2018 - 12:24 PM
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))