Using streams for opening files in unicode.

G

gangs

I need to know how can I open a file which is stored using UTF-16
encoding in unicode. I am desperately trying to open the file using the
wofstream typedef, but even it takes the parameter as const char*, I
tried converting the filename from UTF16 to UTF8 encoding, wofstream
does not seem to work with that.
What I gather is that streams internally use fopen for opening up a
file, I could not find any way for passing a file descriptor to the
stream class to initialize it, basically trying to use a _wfopen to get
a file descriptor, but how can I pass it to a stream to initialize it
to it?

Kindly Note: I have to use streams for the same, it is a restriction in
the current architecture.

Please do let me know of any other way .

Gangs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top