From: David Lowndes on
>Neither the VS6 or VS2008 projects build Unicode versions. This is by
>design. The resource file is a Big5-encoded TrChinese string. Looks
>fine under both VS6 and 2008 on full Hong Kong Win7, looks okay only
>under VS6 on English Win7 with HK language pack. The code is simply
>...

Can you be more specific about what characters you should be getting
and where precisely they're becoming "?" characters. Presumably latin
characters in the string aren't exhibiting the problem?

As Alexander says, a move to a Unicode build is probably the best
solution.

Dave
From: David on
On Feb 4, 10:18 am, David Lowndes <Dav...(a)example.invalid> wrote:
> >Neither the VS6 or VS2008 projects build Unicode versions. This is by
> >design. The resource file is a Big5-encoded TrChinese string. Looks
> >fine under both VS6 and 2008 on full Hong Kong Win7, looks okay only
> >under VS6 on English Win7 with HK language pack. The code is simply
> >...
>
> Can you be more specific about what characters you should be getting
> and where precisely they're becoming "?" characters. Presumably latin
> characters in the string aren't exhibiting the problem?
>
> As Alexander says, a move to a Unicode build is probably the best
> solution.
>
> Dave

Moving to Unicode is out of the question. This program has shipped
many thousands of copies and runs on WinXP, Vista and Windows 7. It is
a mature product and has language files for about 15 languages, all
produced in UTF-8 format with the appropriate code pages being called
out. A future major rework would probably be done in Unicode but that
is not in the short-term view.

Thanks for the assistance.
From: Ivo Beltchev on
I think you are confusing things here (or maybe I am?). But as far as I
know the resources are ALWAYS built as Unicode, even for ANSI
applications. It doesn't matter what's the encoding of your resource
file. So you can convert your .rc file to Unicode (UTF-8, UTF-16,
whatever) and still have ANSI program.

Also what you are saying "UTF-8 format with appropriate code pages"
makes no sense. If the .rc file is Unicode (UTF-8) then you shouldn't
specify code pages. Code pages are if you have ANSI .rc file. If you
have both bad things can happen. Can that be your problem? Some time ago
(either VS 2003 or VS 2005) they added support for Unicode .rc files.
Maybe VC6 treated the file as ANSI, ignoring the fact it is UTF-8. The
new Visual Studio recognizes the BOM and treats it (correctly) as
Unicode, but later gets confused by the code page directives.

If that's the problem I would advise to convert your .rc file to
Unicode. This will simplify the handling of all languages. You will be
able to see all languages at the same time without having to switch the
code page in your text editor. I want to stress that this won't make
your application Unicode. All you need to do is reformat the .rc file.
No code change is needed.

Ivo

David wrote:
> On Feb 4, 10:18 am, David Lowndes <Dav...(a)example.invalid> wrote:
>>> Neither the VS6 or VS2008 projects build Unicode versions. This is by
>>> design. The resource file is a Big5-encoded TrChinese string. Looks
>>> fine under both VS6 and 2008 on full Hong Kong Win7, looks okay only
>>> under VS6 on English Win7 with HK language pack. The code is simply
>>> ...
>> Can you be more specific about what characters you should be getting
>> and where precisely they're becoming "?" characters. Presumably latin
>> characters in the string aren't exhibiting the problem?
>>
>> As Alexander says, a move to a Unicode build is probably the best
>> solution.
>>
>> Dave
>
> Moving to Unicode is out of the question. This program has shipped
> many thousands of copies and runs on WinXP, Vista and Windows 7. It is
> a mature product and has language files for about 15 languages, all
> produced in UTF-8 format with the appropriate code pages being called
> out. A future major rework would probably be done in Unicode but that
> is not in the short-term view.
>
> Thanks for the assistance.
From: David on
Not to beat a dead horse, but the current application (as shipping)
works on all of the target languages including Win7 Hong Kong edition.
The problem is that it does not work on Win7 English edition with Hong
Kong language pack. It also works on both of those when built with
VS6.

The fundamental question is: what is different between the native Hong
Kong Win7 and Win7 with HK language pack systems? Also, what is
different between the VS6 and VS2008 programs? (The same resource
file, built with VS2008, works on both versions of the code.)
From: Ivo Beltchev on
???? usually indicates that some text is being converted from Unicode to
ANSI, and the characters can't be represented in the current code page.
This can happen inside a system call like LoadStringA/DialogBoxA, or in
your user code (I'm lumping the MFC sources in this category).

So try this - call WideCharToMultiByte(CP_ACP) with the same Hong
Kongian text on both systems. This is what functions like LoadStringA
use internally. If you get correct result on one system and wrong on the
other you can remove the resource system as a suspect. If both are
correct, then most likely the failure is in your code or MFC.



David wrote:
> Not to beat a dead horse, but the current application (as shipping)
> works on all of the target languages including Win7 Hong Kong edition.
> The problem is that it does not work on Win7 English edition with Hong
> Kong language pack. It also works on both of those when built with
> VS6.
>
> The fundamental question is: what is different between the native Hong
> Kong Win7 and Win7 with HK language pack systems? Also, what is
> different between the VS6 and VS2008 programs? (The same resource
> file, built with VS2008, works on both versions of the code.)