UNICODE to MBCS



Hi,

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.

Furthermore, does anyone know of any problems with doing this? Are
there certian characters that will become lost in translation?

I'm a newbie to I18N, but I've read somewhere that you can take Unicode
code points and save them into any encoding as long as the target
encoding has an equivalent code point. So if I have a 'A' and save it
in UTF-16 I can then re-save it as English ANSI and it will still be
'A'. Is that universally true. If I have Japanese or some other Asian
language symbol save it in UTF-16 and then re-save it as that locale's
ANSI DBCS will it be the same?

Regards,
Matt

.



Relevant Pages

  • Re: How to Get the ByteLength from CString when it is Unicode
    ... UTF8 is one of many MBCS encodings. ... Unicode is not an MBCS; UTF8 is (or at least the WideCharToMultiByte API call thinks it ... The number of characters is based on interpreting 'character' as WCHAR in Unicode and CHAR ...
    (microsoft.public.vc.mfc)
  • Re: Code Page problem in SetWindowText
    ... to Unicode before calling NT internal routines and converting back to MBCS before returning to the caller. ... W take Unicode i.e. UTF-16. ... in most character sets, ... I understand that Unicode is the best way of string operations for morden ...
    (microsoft.public.vc.mfc)
  • Re: MBCS vs UNICODE
    ... If i understood well MBCS is also used for eastern languages like chinese, ... A large difference between Unicode and MBCS is that there is only one ... as single-byte character sets like ASCII or ANSI. ...
    (microsoft.public.vc.language)
  • Re: Project chenged from MBCS to Unicode gives Linker error
    ... Calculations -> MBCS ... User Interface -> Unicode ... You can't use LPCTSTR or TCHAR or CString at the *interface* between modules ...
    (microsoft.public.vc.mfc)
  • MBCS/Unicode parent/child windows and WM_CHAR
    ... application can be built as both MBCS and Unicode. ... The problem I am encountering is that when a Unicode component is used ... Unicode wParam character code). ...
    (microsoft.public.win32.programmer.ui)

Loading