Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set nls_lang in C++ == setlocale doesn't work

Status
Not open for further replies.

TheMillionDollarMan

Programmer
Jun 10, 2002
132
US


Hi,

I am using Windows 2000 , VC++ version 6 and Oracle 8.

I am trying to find the equivalent to the dos function
set nls_lang=japanese_japan.ja16sjis
for VC++ and VB 6.0.

In the help on VC++ I have found the setlocale example where it shows German in the example however I can seem to show Japanese characters in a Data Grid.

It compiles ok with

#include <wchar.h> //For set Locale
#include <time.h>
#include <stdio.h>

#include <locale.h>
and

setlocale(LC_ALL, &quot;Japanese&quot;);

But doesn't show the Japanese characters on ?????.

Thanks
D
 
You will not be able to show japanese characters on your machine until the Japanese language pack is installed and your default input locale is set to Japan.

matt
 
P.S.

I can send you an app that will display japanese characters if your computer has the appropriate configuration.

Matt
 
Sorry I should have added that my machine has had the Japanese code page installed.
Thanks.

I can set my default language to Japanese and have the Japanese characters come through in SQL PLUS (Oralce Client runs in DOS).

here is what I do to get the japanese chars
set nls_lang=japanese_japan.ja16sjis
SQLPLUS UserName/Password@DatabaseName
Select JapaneseField from ATable;

Result is good. I seee Japanese. However I can't see Japanese in any other projects that I build in VB or VC++ whether I completely biuld the project in Japanese or not.


Thanks
D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top