unicode

V

vooood

i'm making a console application and i need unicode support.. how do i
get it? the app also needs to be multiplatform (windows/linux only).. is
it possible to use unicode with pdcurses?


thanx


vooood
 
M

Matthias Kaeppler

vooood said:
i'm making a console application and i need unicode support.. how do i
get it? the app also needs to be multiplatform (windows/linux only).. is
it possible to use unicode with pdcurses?


thanx


vooood

glibc has been ported to C++ and has a type called Glib::ustring. IIRC,
its purpose is to support wide byte characters. It's non-standard, but
it has the same interface as std::string and also behaves like it.
 
V

vooood

Matthias said:
glibc has been ported to C++ and has a type called Glib::ustring. IIRC,
its purpose is to support wide byte characters. It's non-standard, but
it has the same interface as std::string and also behaves like it.

can you tell me where could i find more information on this and
implementation examples?


vooood
 
R

red floyd

Matthias said:
glibc has been ported to C++ and has a type called Glib::ustring. IIRC,
its purpose is to support wide byte characters. It's non-standard, but
it has the same interface as std::string and also behaves like it.

What's wrong with std::wstring ?
 
R

Ron Natalie

vooood said:
i'm making a console application and i need unicode support.. how do i
get it? the app also needs to be multiplatform (windows/linux only).. is
it possible to use unicode with pdcurses?
There's no platform independent UNICODE. Windows uses a 16 bit encoding
of UNICODE, most UNICES use 32 bits. In Windows the interfaces are
natively 16-bit unicode, while on most UNICES things are converted back
to a UTF-8 multibyte encoding.

While using wchar_t and things based on it will get you a lot of the
way, there are a lot of things that you'll have to deal with on an
implementation by impelementation basis (Part of which would be
unnecessary if C++ wasn't lacking wchar_t based interfaces to
the various important system calls like filenames and program
arguments).
 
I

Ioannis Vranos

vooood said:
i'm making a console application and i need unicode support.. how do i
get it? the app also needs to be multiplatform (windows/linux only).. is
it possible to use unicode with pdcurses?


You can use the largest character set of your compiler (usually Unicode) by using wchar_t,
wcin, wcout, wstring and the w facilities in general. :)
 
M

Matthias Kaeppler

Ron said:
There's no platform independent UNICODE. Windows uses a 16 bit encoding
of UNICODE, most UNICES use 32 bits. In Windows the interfaces are
natively 16-bit unicode, while on most UNICES things are converted back
to a UTF-8 multibyte encoding.

But there are platform independent wrapper implementations, that's what
he asked for. glibmm has such an implementation, and it's called
Glib::ustring. gtkmm and gdkmm use it exclusively over std::string.

See
http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,203
Messages
2,571,059
Members
47,668
Latest member
SamiraShac

Latest Threads

Top