It's better to convert all strings to utf8 immediately while creating xml tree, not convert whole file. It's my humble opinion onlyKana wrote:I have code where I write XML file from DBF with
nHandle := FCreate( xmlfile, 0 ) )
...
FWRITE
...
FClose(
This function save ANSI XML file
I don't want convert file with notepad.exe or notepad++ from ANSI to UTF8
Is it posible to save UTF8 file from code?
Problem reading Unicode file
Moderator: Rathinagiri
Re: Problem reading Unicode file
Re: Problem reading Unicode file
I do not have Unicode characters in the file. File has mostly numbers and only in the header file a brief description.mol wrote:It's better to convert all strings to utf8 immediately while creating xml tree, not convert whole file. It's my humble opinion only
Server where I send file requests to be UTF8 otherwise denied.
So I'm looking for the easiest way to file is converted from ANSI to UTF8 because so far I have not written in UNICODE.
Re: Problem reading Unicode file
If you haven't use any utf-8 char, file in ANSI is the same as file saved in UTF8 format.
Try it by creating with notepad ansi file with basic characters:
and convert it to utf8 format and save with differnet filename.
Both files are identical.
Basic characters are saved using 1 byte in UTF8 format.
Try it by creating with notepad ansi file with basic characters:
Code: Select all
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789
Both files are identical.
Basic characters are saved using 1 byte in UTF8 format.
Re: Problem reading Unicode file
I think that I do not have any UTF-8 character, except '@' to display the mail address.
For some reason that's not clear to me the file is rejected with a message that is not in the prescribed format (UTF-8).
When I open this file with notepad.exe and record it as UTF-8 file after that send file without problems.
I can not now to test because now I have not access in the server but I do it next week.
Thanks for the advice and assistance.
For some reason that's not clear to me the file is rejected with a message that is not in the prescribed format (UTF-8).
When I open this file with notepad.exe and record it as UTF-8 file after that send file without problems.
I can not now to test because now I have not access in the server but I do it next week.
Thanks for the advice and assistance.