Carl Appellof
Guest
|
Posted:
Tue Nov 16, 2004 10:39 pm Post subject:
Re: Write ANSI file from Unicode app |
|
|
"Priyesh" <Priyesh_at_do_not_reply> wrote in message
news:%23riFkBAzEHA.3236@TK2MSFTNGP15.phx.gbl...
| Quote: | How would i go about writing / reading an ANSI file from a unicode
application? The issue i am running into is that, CreateFile uses the
unicode version and Read and Write functions does not seem to have an
unicode / ansi difference. So, to deal with ANSI files, would it be
alright
if i use CreateFileA ?
Thanks in advance.
|
The only difference between CreateFileA and CreateFileW is how they treat
the file name string. The W version takes a UNICODE file name string and
the A version takes an ANSI (really multibyte) name string. They don't
create different "types" of files.
The format of the data within the file is up to you. ReadFile and WriteFile
just write bytes. They don't care if the data is ANSI, UNICODE, or binary.
Carl |
|