From: David on
I have a C++ app which when built with VS2008 displays '?' for
characters on an English Win7 system with Hong Kong language pack but
displays proper characters on a native Hong Kong Win7 system. When
built with VS6, it displays properly on both systems. Any insights
would be appreciated. I can provide a tiny sample program.

Thanks, Dave
From: David Lowndes on
>I have a C++ app which when built with VS2008 displays '?' for
>characters on an English Win7 system with Hong Kong language pack but
>displays proper characters on a native Hong Kong Win7 system. When
>built with VS6, it displays properly on both systems. Any insights
>would be appreciated.

>I can provide a tiny sample program.

I think you'll need to show a code snippet to illustrate what you're
doing.

Also the microsoft.public.win32.programmer.international might have
been a more appropriate group for your question.

Dave Lowndes
From: Mihai N. on
> I have a C++ app which when built with VS2008 displays '?' for
> characters on an English Win7 system with Hong Kong language pack but
> displays proper characters on a native Hong Kong Win7 system. When
> built with VS6, it displays properly on both systems. Any insights
> would be appreciated. I can provide a tiny sample program.

Check the project settings.
IT is most likely that the VS2008 project does not build a Unicode version.
See here: http://www.mihai-nita.net/article.php?artID=20060723a


--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email

From: David on
On Feb 4, 4:09 am, "Mihai N." <nmihai_year_2...(a)yahoo.com> wrote:
> > I have a C++ app which when built with VS2008 displays '?' for
> > characters on an English Win7 system with Hong Kong language pack but
> > displays proper characters on a native Hong Kong Win7 system. When
> > built with VS6, it displays properly on both systems. Any insights
> > would be appreciated. I can provide a tiny sample program.
>
> Check the project settings.
> IT is most likely that the VS2008 project does not build a Unicode version.
> See here:http://www.mihai-nita.net/article.php?artID=20060723a
>
> --
> Mihai Nita [Microsoft MVP, Visual C++]http://www.mihai-nita.net
> ------------------------------------------
> Replace _year_ with _ to get the real email

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
the following:

HINSTANCE hInst = LoadLibrary("resources.dll");
if (hInst != NULL)
{
AfxSetResourceHandle(hInst);
MessageBox("Language File Loaded", "", MB_OK);
}
else
{
MessageBox("Language File NOT Loaded", "ERROR", MB_ICONSTOP);
EndDialog(-1);
return FALSE;
}

// Now read a single string from the resource file and put
// its text onto the text string.
CString textToSet;
#define IDS_ACCEPT_LICENSE 233
textToSet.LoadString(IDS_ACCEPT_LICENSE);
((CStatic *)GetDlgItem(IDC_TEXT))->SetWindowText(textToSet);

From: Alexander Grigoriev on
The best advice is: switch to UNICODE. That'll solve many problems.

"David" <dgintz(a)gmail.com> wrote in message
news:987c09d9-ad0e-401a-8b8e-7978942aad8c(a)k22g2000vbp.googlegroups.com...
On Feb 4, 4:09 am, "Mihai N." <nmihai_year_2...(a)yahoo.com> wrote:
> > I have a C++ app which when built with VS2008 displays '?' for
> > characters on an English Win7 system with Hong Kong language pack but
> > displays proper characters on a native Hong Kong Win7 system. When
> > built with VS6, it displays properly on both systems. Any insights
> > would be appreciated. I can provide a tiny sample program.
>
> Check the project settings.
> IT is most likely that the VS2008 project does not build a Unicode
> version.
> See here:http://www.mihai-nita.net/article.php?artID=20060723a
>
> --
> Mihai Nita [Microsoft MVP, Visual C++]http://www.mihai-nita.net
> ------------------------------------------
> Replace _year_ with _ to get the real email

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
the following:

HINSTANCE hInst = LoadLibrary("resources.dll");
if (hInst != NULL)
{
AfxSetResourceHandle(hInst);
MessageBox("Language File Loaded", "", MB_OK);
}
else
{
MessageBox("Language File NOT Loaded", "ERROR", MB_ICONSTOP);
EndDialog(-1);
return FALSE;
}

// Now read a single string from the resource file and put
// its text onto the text string.
CString textToSet;
#define IDS_ACCEPT_LICENSE 233
textToSet.LoadString(IDS_ACCEPT_LICENSE);
((CStatic *)GetDlgItem(IDC_TEXT))->SetWindowText(textToSet);