]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/mbcnvfil.tex
test indeterminate wxGauge mode (part of patch 1551409)
[wxWidgets.git] / docs / latex / wx / mbcnvfil.tex
1 \section{\class{wxMBConvFile}}\label{wxmbconvfile}
2
3 This class used to define the class instance
4 {\bf wxConvFileName}, but nowadays {\bf wxConvFileName} is
5 either of type wxConvLibc (on most platforms) or wxConvUTF8
6 (on MacOS X). {\bf wxConvFileName} converts filenames between
7 filesystem multibyte encoding and Unicode. {\bf wxConvFileName}
8 can also be set to a something else at run-time which is used
9 e.g. by wxGTK to use a class which checks the environment
10 variable {\bf G\_FILESYSTEM\_ENCODING} indicating that filenames
11 should not be interpreted as UTF8 and also for converting
12 invalid UTF8 characters (e.g. if there is a filename in iso8859\_1)
13 to strings with octal values.
14
15 Since some platforms (such as Win32) use Unicode in the filenames,
16 and others (such as Unix) use multibyte encodings, this class should only
17 be used directly if wxMBFILES is defined to 1. A convenience macro,
18 wxFNCONV, is defined to wxConvFileName->cWX2MB in this case. You could
19 use it like this:
20
21 \begin{verbatim}
22 wxChar *name = wxT("rawfile.doc");
23 FILE *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
47 Converts 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
53 Converts from Unicode to multibyte filename encoding. Returns the size of the destination buffer.
54