PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
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
Connect yourself…
Mister TRIANTAFILLOS
#1
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 ?
Report
0
0
Fabrice Harari
#2
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 ?
Report
0
0
Mister TRIANTAFILLOS
#3
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
)
)
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text