]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/mbcnvfil.tex
Typo correction
[wxWidgets.git] / docs / latex / wx / mbcnvfil.tex
CommitLineData
f6bcfd97
BP
1\section{\class{wxMBConvFile}}\label{wxmbconvfile}
2
802fa226 3This class used to define the class instance
a7d34a61
RR
4{\bf wxConvFileName}, but nowadays {\bf wxConvFileName} is
5either of type wxConvLibc (on most platforms) or wxConvUTF8
6(on MacOS X). {\bf wxConvFileName} converts filenames between
7filesystem multibyte encoding and Unicode. {\bf wxConvFileName}
8can also be set to a something else at run-time which is used
9e.g. by wxGTK to use a class which checks the environment
40ca9449 10variable {\bf G\_FILESYSTEM\_ENCODING} indicating that filenames
a7d34a61 11should not be interpreted as UTF8 and also for converting
40ca9449 12invalid UTF8 characters (e.g. if there is a filename in iso8859\_1)
a7d34a61
RR
13to strings with octal values.
14
802fa226
JS
15Since some platforms (such as Win32) use Unicode in the filenames,
16and others (such as Unix) use multibyte encodings, this class should only
f6bcfd97 17be used directly if wxMBFILES is defined to 1. A convenience macro,
a7d34a61
RR
18wxFNCONV, is defined to wxConvFileName->cWX2MB in this case. You could
19use it like this:
f6bcfd97
BP
20
21\begin{verbatim}
22wxChar *name = wxT("rawfile.doc");
23FILE *fil = fopen(wxFNCONV(name), "r");
24\end{verbatim}
25
26(although it would be better to use wxFopen(name, wxT("r")) in this case.)
27
28\wxheading{Derived from}
29
30\helpref{wxMBConv}{wxmbconv}
31
32\wxheading{Include files}
33
34<wx/strconv.h>
35
36\wxheading{See also}
37
38\helpref{wxMBConv classes overview}{mbconvclasses}
39
40\latexignore{\rtfignore{\wxheading{Members}}}
41
42
43\membersection{wxMBConvFile::MB2WC}\label{wxmbconvfilemb2wc}
44
45\constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}}
46
47Converts from multibyte filename encoding to Unicode. Returns the size of the destination buffer.
48
49\membersection{wxMBConvFile::WC2MB}\label{wxmbconvfilewc2mb}
50
51\constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}}
52
53Converts from Unicode to multibyte filename encoding. Returns the size of the destination buffer.
54