Read it if you want to know more about how to write programs able to work with
characters from languages other than English.
Read it if you want to know more about how to write programs able to work with
characters from languages other than English.
on the platforms which support it. Unicode is a standard for character
encoding which addresses the shortcomings of the previous, 8 bit standards, by
using at least 16 (and possibly 32) bits for encoding each character. This
on the platforms which support it. Unicode is a standard for character
encoding which addresses the shortcomings of the previous, 8 bit standards, by
using at least 16 (and possibly 32) bits for encoding each character. This
need for the system to convert all strings the program uses to/from Unicode
each time a system call is made.
need for the system to convert all strings the program uses to/from Unicode
each time a system call is made.
many cases it is unwise to write a program which can only work in Unicode
environment. A better solution is to write programs in such way that they may
be compiled either in ANSI (traditional) mode or in the Unicode one.
many cases it is unwise to write a program which can only work in Unicode
environment. A better solution is to write programs in such way that they may
be compiled either in ANSI (traditional) mode or in the Unicode one.
And finally, the standard preprocessor tokens enumerated above expand to ANSI
strings but it is more likely that Unicode strings are wanted in the Unicode
And finally, the standard preprocessor tokens enumerated above expand to ANSI
strings but it is more likely that Unicode strings are wanted in the Unicode
and {\tt \_\_TTIME\_\_} which behave exactly as the standard ones except that
they produce ANSI strings in ANSI build and Unicode ones in the Unicode build.
and {\tt \_\_TTIME\_\_} which behave exactly as the standard ones except that
they produce ANSI strings in ANSI build and Unicode ones in the Unicode build.
\item Always use {\tt wxChar} instead of {\tt char}
\item Always enclose literal string constants in \helpref{wxT()}{wxt} macro
unless they're already converted to the right representation (another standard
\item Always use {\tt wxChar} instead of {\tt char}
\item Always enclose literal string constants in \helpref{wxT()}{wxt} macro
unless they're already converted to the right representation (another standard
need for {\tt wxT()} in this case) or you intend to pass the constant directly
to an external function which doesn't accept wide-character strings.
\item Use {\tt wxString} instead of C style strings.
\end{itemize}
need for {\tt wxT()} in this case) or you intend to pass the constant directly
to an external function which doesn't accept wide-character strings.
\item Use {\tt wxString} instead of C style strings.
\end{itemize}
and macros, but it has been also mentioned that it isn't quite enough.
Although everything works fine inside the program, things can get nasty when
it tries to communicate with the outside world which, sadly, often expects
and macros, but it has been also mentioned that it isn't quite enough.
Although everything works fine inside the program, things can get nasty when
it tries to communicate with the outside world which, sadly, often expects
% TODO describe fn_str(), wx_str(), wxCharBuf classes, ...
% TODO describe fn_str(), wx_str(), wxCharBuf classes, ...
You should define {\tt wxUSE\_UNICODE} to $1$ to compile your program in
Unicode mode. Note that it currently only works in Win32 and GTK 2.0 and
that some parts of
You should define {\tt wxUSE\_UNICODE} to $1$ to compile your program in
Unicode mode. Note that it currently only works in Win32 and GTK 2.0 and
that some parts of
compile your program in ANSI mode you can still define {\tt wxUSE\_WCHAR\_T}
to get some limited support for {\tt wchar\_t} type.
compile your program in ANSI mode you can still define {\tt wxUSE\_WCHAR\_T}
to get some limited support for {\tt wchar\_t} type.