Files
wxWidgets/docs/latex/wx/mbcnvfil.tex
Robert Roebling a7d34a619b Mini doc update for wxConvFileName.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-29 23:33:16 +00:00

60 lines
2.0 KiB
TeX

%
% automatically generated by HelpGen from
% ../include/wx/strconv.h at 25/Mar/00 10:20:56
%
\section{\class{wxMBConvFile}}\label{wxmbconvfile}
This class used to be used for defining the class instance
{\bf wxConvFileName}, but nowadays {\bf wxConvFileName} is
either of type wxConvLibc (on most platforms) or wxConvUTF8
(on MacOS X). {\bf wxConvFileName} converts filenames between
filesystem multibyte encoding and Unicode. {\bf wxConvFileName}
can also be set to a something else at run-time which is used
e.g. by wxGTK to use a class which checks the environment
variable {\bf G_FILESYSTEM_ENCODING} indicating that filenames
should not be interpreted as UTF8 and also for converting
invalid UTF8 characters (e.g. if there is a filename in iso8859_1)
to strings with octal values.
Since some platforms (e.g. Win32) use Unicode in the filenames,
and others (e.g. Unix) use multibyte encodings, this class should only
be used directly if wxMBFILES is defined to 1. A convenience macro,
wxFNCONV, is defined to wxConvFileName->cWX2MB in this case. You could
use it like this:
\begin{verbatim}
wxChar *name = wxT("rawfile.doc");
FILE *fil = fopen(wxFNCONV(name), "r");
\end{verbatim}
(although it would be better to use wxFopen(name, wxT("r")) in this case.)
\wxheading{Derived from}
\helpref{wxMBConv}{wxmbconv}
\wxheading{Include files}
<wx/strconv.h>
\wxheading{See also}
\helpref{wxMBConv classes overview}{mbconvclasses}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxMBConvFile::MB2WC}\label{wxmbconvfilemb2wc}
\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}}
Converts from multibyte filename encoding to Unicode. Returns the size of the destination buffer.
\membersection{wxMBConvFile::WC2MB}\label{wxmbconvfilewc2mb}
\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}}
Converts from Unicode to multibyte filename encoding. Returns the size of the destination buffer.