Re: UNICODE to MBCS
- From: David Lowndes <DavidL@xxxxxxxxxxxxxxx>
- Date: Wed, 01 Mar 2006 00:22:40 +0000
I'm trying to figure out if I need to do anything special inorder to
read unicode into a dll written using MBCS. We have string files that
are saved as Unicode (UTF-16) and we are forced to load these files
into a dll that is compiled using MBCS. Do we need to run
WideCharToMultiByte on everything that comes back? We are using
GetPrivateProfileString when reading from the file if that makes a
difference.
Matt,
The MSDN documentation for the corresponding WritePrivateProfileString
mentions:
"If the file was created using Unicode characters, the function writes
Unicode characters to the file. Otherwise, the function writes ANSI
characters.
"
.... so I'd expect GetPrivateProfileString would behave in the same
manner - though I've never explicitly checked it. Why not write a few
lines of code and check it?
Furthermore, does anyone know of any problems with doing this? Are
there certian characters that will become lost in translation?
Undoubtedly, where there's any Unicode -> MBCS translation, if the
characters are not available in the code page they will be
substituted.
Dave
.
- Follow-Ups:
- Re: UNICODE to MBCS
- From: CLoser
- Re: UNICODE to MBCS
- References:
- UNICODE to MBCS
- From: CLoser
- UNICODE to MBCS
- Prev by Date: Re: UNICODE to MBCS
- Next by Date: I don't know why this code don't compile (22 lines)
- Previous by thread: Re: UNICODE to MBCS
- Next by thread: Re: UNICODE to MBCS
- Index(es):
Relevant Pages
|