Re: UNICODE
On Jul 7, 12:50 pm, Michael DOUBEZ <michael.dou...@free.fr> wrote:
Anarki a =C3=A9crit :
I would like to print a string in unicode. I compiled using gcc 3.4.4
in Cygwin(windows Xp). I used the following code. Gcc compiles it and
links but not giving the expected output, g++ don't even compile it,
it says wprintf is undeclared.
Use <cwchar> instead.
I would also like to know why gcc
compiles it and g++ dosen't.
Without, the error message we can only guess (perhaps a conflict -
mbstate_t ?).
someone please help me print a unicode
string using gcc or g++ in cygwin(windows xp)
I assume your console is properly configured.
#include <cwchar>
#include <clocale> //for setlocale
#include <cstdlib> //for SUCCESS
int main()
{
wchar_t mal[] = L"=E0=B4=A6=E0=B5=80=E0=B4=
=AA=E0=B5=8D=E2=80=8C=E0=B4=9A=E0=B4=A8=E0=B5=8D=E0=B4=A6=E0=B5=8D=E2=80=8C=
=E0=B4=AA=E0=B4=BF";
std::setlocale( LC_ALL, "XXX" );//your language: Indian ?
std::wprintf(mal);
return EXIT_SUCCESS;
}
excuse me what u mean by properly configured console? I think i
haven't done any configuring can you please guide me am a novice in
configuring this cygwin all these days i was in visual studio, hope u
will help me and by the way the posted program didn't work :(. The
language i used was malayalam, language of Kerala/India.