Write ANSI file from Unicode app
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Write ANSI file from Unicode app

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> File System
Author Message
Priyesh
Guest





Posted: Tue Nov 16, 2004 10:14 pm    Post subject: Write ANSI file from Unicode app Reply with 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.
Back to top
Carl Appellof
Guest





Posted: Tue Nov 16, 2004 10:39 pm    Post subject: Re: Write ANSI file from Unicode app Reply with quote

"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
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> File System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB