File: classwx_conv_auto.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (373 lines) | stat: -rw-r--r-- 41,032 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: wxConvAuto Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classwx_conv_auto-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxConvAuto Class Reference<div class="ingroups"><a class="el" href="group__group__class__data.html">Data Structures</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;wx/convauto.h&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for wxConvAuto:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classwx_conv_auto__inherit__graph.png" border="0" usemap="#wx_conv_auto_inherit__map" alt="Inheritance graph"/></div>
<map name="wx_conv_auto_inherit__map" id="wx_conv_auto_inherit__map">
<area shape="rect" id="node2" href="classwx_m_b_conv.html" title="This class is the base class of a hierarchy of classes capable of converting text strings between mul..." alt="" coords="9,6,95,34"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class implements a Unicode to/from multibyte converter capable of automatically recognizing the encoding of the multibyte text on input. </p>
<p>The logic used is very simple: the class uses the BOM (byte order mark) if it's present and tries to interpret the input as UTF-8 otherwise. If this fails, the input is interpreted as being in the default multibyte encoding which can be specified in the constructor of a <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> instance and, in turn, defaults to the value of <a class="el" href="classwx_conv_auto.html#a7dc2532ac7a49fddf4da770b1a814abd" title="Returns the encoding used by default by wxConvAuto if no other encoding is explicitly specified in co...">GetFallbackEncoding()</a> if not explicitly given.</p>
<p>For the conversion from Unicode to multibyte, the same encoding as was previously used for multibyte to Unicode conversion is reused. If there had been no previous multibyte to Unicode conversion, UTF-8 is used by default. Notice that once the multibyte encoding is automatically detected, it doesn't change any more, i.e. it is entirely determined by the first use of <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> object in the multibyte-to-Unicode direction. However creating a copy of <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> object, either via the usual copy constructor or assignment operator, or using <a class="el" href="classwx_m_b_conv.html#ae6fd1020a2c7c82191c4822682e80d05" title="This pure virtual function is overridden in each of the derived classes to return a new copy of the o...">wxMBConv::Clone()</a>, resets the automatically detected encoding so that the new copy will try to detect the encoding of the input on first use.</p>
<p>This class is used by default in wxWidgets classes and functions reading text from files such as <a class="el" href="classwx_file.html" title="A wxFile performs raw file I/O.">wxFile</a>, <a class="el" href="classwx_f_file.html" title="wxFFile implements buffered file I/O.">wxFFile</a>, <a class="el" href="classwx_text_file.html" title="The wxTextFile is a simple class which allows to work with text files on line by line basis...">wxTextFile</a>, <a class="el" href="classwx_file_config.html" title="wxFileConfig implements wxConfigBase interface for storing and retrieving configuration information u...">wxFileConfig</a> and various stream classes so the encoding set with its <a class="el" href="classwx_conv_auto.html#a5c3f9760a2ae03fbf4748423367e7903" title="Changes the encoding used by default by wxConvAuto if no other encoding is explicitly specified in co...">SetFallbackEncoding()</a> method will affect how these classes treat input files. In particular, use this method to change the fall-back multibyte encoding used to interpret the contents of the files whose contents isn't valid UTF-8 or to disallow it completely.</p>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxbase">wxBase</a></span></div><div><span class="category">Category:</span>&#160;&#160;<span class="category_text"><a class="el" href="group__group__class__data.html">Data Structures</a></span></div><dl class="section see"><dt>See Also</dt><dd><a class="el" href="overview_mbconv.html">wxMBConv Overview</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a88494409bdecddb4822470dd1ba8834a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_conv_auto.html#a88494409bdecddb4822470dd1ba8834a">wxConvAuto</a> (<a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439acca">wxFontEncoding</a> enc=<a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439accaa8830ac2e2c3770c7a46be31c5340687f">wxFONTENCODING_DEFAULT</a>)</td></tr>
<tr class="memdesc:a88494409bdecddb4822470dd1ba8834a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> instance.  <a href="#a88494409bdecddb4822470dd1ba8834a"></a><br/></td></tr>
<tr class="separator:a88494409bdecddb4822470dd1ba8834a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d64e621be1c3cd491c483f1f7559a85"><td class="memItemLeft" align="right" valign="top"><a class="el" href="convauto_8h.html#af393832da543c9238919f38be4536f60">wxBOM</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_conv_auto.html#a0d64e621be1c3cd491c483f1f7559a85">GetBOM</a> () const </td></tr>
<tr class="memdesc:a0d64e621be1c3cd491c483f1f7559a85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the detected BOM type.  <a href="#a0d64e621be1c3cd491c483f1f7559a85"></a><br/></td></tr>
<tr class="separator:a0d64e621be1c3cd491c483f1f7559a85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a708201fd5509f31db43fb2e265432a7d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_conv_auto.html#a708201fd5509f31db43fb2e265432a7d">GetBOMChars</a> (<a class="el" href="convauto_8h.html#af393832da543c9238919f38be4536f60">wxBOM</a> bom, size_t *count)</td></tr>
<tr class="memdesc:a708201fd5509f31db43fb2e265432a7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a pointer to the characters that makes up this BOM.  <a href="#a708201fd5509f31db43fb2e265432a7d"></a><br/></td></tr>
<tr class="separator:a708201fd5509f31db43fb2e265432a7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classwx_m_b_conv"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classwx_m_b_conv')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classwx_m_b_conv.html">wxMBConv</a></td></tr>
<tr class="memitem:ab2348d20301679ce0cf5c565446b0080 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#ab2348d20301679ce0cf5c565446b0080">wxMBConv</a> ()</td></tr>
<tr class="memdesc:ab2348d20301679ce0cf5c565446b0080 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trivial default constructor.  <a href="#ab2348d20301679ce0cf5c565446b0080"></a><br/></td></tr>
<tr class="separator:ab2348d20301679ce0cf5c565446b0080 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6fd1020a2c7c82191c4822682e80d05 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classwx_m_b_conv.html">wxMBConv</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#ae6fd1020a2c7c82191c4822682e80d05">Clone</a> () const =0</td></tr>
<tr class="memdesc:ae6fd1020a2c7c82191c4822682e80d05 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">This pure virtual function is overridden in each of the derived classes to return a new copy of the object it is called on.  <a href="#ae6fd1020a2c7c82191c4822682e80d05"></a><br/></td></tr>
<tr class="separator:ae6fd1020a2c7c82191c4822682e80d05 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d6590cbcc686be76a9c4f1c071ff99f inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a2d6590cbcc686be76a9c4f1c071ff99f">GetMBNulLen</a> () const </td></tr>
<tr class="memdesc:a2d6590cbcc686be76a9c4f1c071ff99f inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns 1 for most of the multibyte encodings in which the string is terminated by a single <code>NUL</code>, 2 for UTF-16 and 4 for UTF-32 for which the string is terminated with 2 and 4 <code>NUL</code> characters respectively.  <a href="#a2d6590cbcc686be76a9c4f1c071ff99f"></a><br/></td></tr>
<tr class="separator:a2d6590cbcc686be76a9c4f1c071ff99f inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22ad1976c06a540a95dfa878038d65f2 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a22ad1976c06a540a95dfa878038d65f2">ToWChar</a> (wchar_t *dst, size_t dstLen, const char *src, size_t srcLen=wxNO_LEN) const </td></tr>
<tr class="memdesc:a22ad1976c06a540a95dfa878038d65f2 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert multibyte string to a wide character one.  <a href="#a22ad1976c06a540a95dfa878038d65f2"></a><br/></td></tr>
<tr class="separator:a22ad1976c06a540a95dfa878038d65f2 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a149c15b515e008fdd1f69a852f11594e inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a149c15b515e008fdd1f69a852f11594e">FromWChar</a> (char *dst, size_t dstLen, const wchar_t *src, size_t srcLen=wxNO_LEN) const </td></tr>
<tr class="memdesc:a149c15b515e008fdd1f69a852f11594e inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts wide character string to multibyte.  <a href="#a149c15b515e008fdd1f69a852f11594e"></a><br/></td></tr>
<tr class="separator:a149c15b515e008fdd1f69a852f11594e inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e572efeda6c5c73ddff1292609fa211 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_w_char_buffer.html">wxWCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a0e572efeda6c5c73ddff1292609fa211">cMB2WC</a> (const char *in, size_t inLen, size_t *outLen) const </td></tr>
<tr class="memdesc:a0e572efeda6c5c73ddff1292609fa211 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from multibyte encoding to Unicode by calling <a class="el" href="classwx_m_b_conv.html#a22ad1976c06a540a95dfa878038d65f2" title="Convert multibyte string to a wide character one.">ToWChar()</a> and allocating a temporary <a class="el" href="classwx_w_char_buffer.html" title="This is a specialization of wxCharTypeBuffer&lt;T&gt; for wchar_t type.">wxWCharBuffer</a> to hold the result.  <a href="#a0e572efeda6c5c73ddff1292609fa211"></a><br/></td></tr>
<tr class="separator:a0e572efeda6c5c73ddff1292609fa211 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aced3961b0bdad13f390343b2b70d49b1 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_w_char_buffer.html">wxWCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#aced3961b0bdad13f390343b2b70d49b1">cMB2WC</a> (const <a class="el" href="classwx_char_buffer.html">wxCharBuffer</a> &amp;buf) const </td></tr>
<tr class="memdesc:aced3961b0bdad13f390343b2b70d49b1 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a char buffer to wide char one.  <a href="#aced3961b0bdad13f390343b2b70d49b1"></a><br/></td></tr>
<tr class="separator:aced3961b0bdad13f390343b2b70d49b1 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a496c808fc769800659e5de1a74115a54 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_char_buffer.html">wxCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a496c808fc769800659e5de1a74115a54">cWC2MB</a> (const wchar_t *in, size_t inLen, size_t *outLen) const </td></tr>
<tr class="memdesc:a496c808fc769800659e5de1a74115a54 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from Unicode to multibyte encoding by calling <a class="el" href="classwx_m_b_conv.html#a149c15b515e008fdd1f69a852f11594e" title="Converts wide character string to multibyte.">FromWChar()</a> and allocating a temporary <a class="el" href="classwx_char_buffer.html" title="This is a specialization of wxCharTypeBuffer&lt;T&gt; for char type.">wxCharBuffer</a> to hold the result.  <a href="#a496c808fc769800659e5de1a74115a54"></a><br/></td></tr>
<tr class="separator:a496c808fc769800659e5de1a74115a54 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34d1ea0725e5001e4f74a5dbf5c81c4f inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_char_buffer.html">wxCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a34d1ea0725e5001e4f74a5dbf5c81c4f">cWC2MB</a> (const <a class="el" href="classwx_w_char_buffer.html">wxWCharBuffer</a> &amp;buf) const </td></tr>
<tr class="memdesc:a34d1ea0725e5001e4f74a5dbf5c81c4f inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a wide char buffer to char one.  <a href="#a34d1ea0725e5001e4f74a5dbf5c81c4f"></a><br/></td></tr>
<tr class="separator:a34d1ea0725e5001e4f74a5dbf5c81c4f inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79d63eff51836148157c986943835742 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a79d63eff51836148157c986943835742">MB2WC</a> (wchar_t *out, const char *in, size_t outLen) const </td></tr>
<tr class="separator:a79d63eff51836148157c986943835742 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a537a0f90ab4738e3e9be58d9a77b71b1 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a537a0f90ab4738e3e9be58d9a77b71b1">WC2MB</a> (char *buf, const wchar_t *psz, size_t n) const </td></tr>
<tr class="separator:a537a0f90ab4738e3e9be58d9a77b71b1 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62b723fea6758812e786a3ec5797f8ba inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a62b723fea6758812e786a3ec5797f8ba">cMB2WX</a> (const char *psz) const </td></tr>
<tr class="memdesc:a62b723fea6758812e786a3ec5797f8ba inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from multibyte encoding to the current wxChar type (which depends on whether wxUSE_UNICODE is set to 1).  <a href="#a62b723fea6758812e786a3ec5797f8ba"></a><br/></td></tr>
<tr class="separator:a62b723fea6758812e786a3ec5797f8ba inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8632260d14b0afcba0f2bc524ca2134 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_w_char_buffer.html">wxWCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#af8632260d14b0afcba0f2bc524ca2134">cMB2WX</a> (const char *psz) const </td></tr>
<tr class="memdesc:af8632260d14b0afcba0f2bc524ca2134 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from multibyte encoding to the current wxChar type (which depends on whether wxUSE_UNICODE is set to 1).  <a href="#af8632260d14b0afcba0f2bc524ca2134"></a><br/></td></tr>
<tr class="separator:af8632260d14b0afcba0f2bc524ca2134 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9bcb820aebfdd3d3e50a929b01c52f8d inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const wchar_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a9bcb820aebfdd3d3e50a929b01c52f8d">cWC2WX</a> (const wchar_t *psz) const </td></tr>
<tr class="memdesc:a9bcb820aebfdd3d3e50a929b01c52f8d inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from Unicode to the current wxChar type.  <a href="#a9bcb820aebfdd3d3e50a929b01c52f8d"></a><br/></td></tr>
<tr class="separator:a9bcb820aebfdd3d3e50a929b01c52f8d inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6c7885e9186d5ce2786b49169c872f1 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_char_buffer.html">wxCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#ac6c7885e9186d5ce2786b49169c872f1">cWC2WX</a> (const wchar_t *psz) const </td></tr>
<tr class="memdesc:ac6c7885e9186d5ce2786b49169c872f1 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from Unicode to the current wxChar type.  <a href="#ac6c7885e9186d5ce2786b49169c872f1"></a><br/></td></tr>
<tr class="separator:ac6c7885e9186d5ce2786b49169c872f1 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15f4266aa96806bb5eebc9b1c4eaff05 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a15f4266aa96806bb5eebc9b1c4eaff05">cWX2MB</a> (const <a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> *psz) const </td></tr>
<tr class="memdesc:a15f4266aa96806bb5eebc9b1c4eaff05 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from the current wxChar type to multibyte encoding.  <a href="#a15f4266aa96806bb5eebc9b1c4eaff05"></a><br/></td></tr>
<tr class="separator:a15f4266aa96806bb5eebc9b1c4eaff05 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bbb71a7814c12dac290f6b61a3acc15 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_char_buffer.html">wxCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a3bbb71a7814c12dac290f6b61a3acc15">cWX2MB</a> (const <a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> *psz) const </td></tr>
<tr class="memdesc:a3bbb71a7814c12dac290f6b61a3acc15 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from the current wxChar type to multibyte encoding.  <a href="#a3bbb71a7814c12dac290f6b61a3acc15"></a><br/></td></tr>
<tr class="separator:a3bbb71a7814c12dac290f6b61a3acc15 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae08f0764f8acb6b075846c8bf126f57b inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const wchar_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#ae08f0764f8acb6b075846c8bf126f57b">cWX2WC</a> (const <a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> *psz) const </td></tr>
<tr class="memdesc:ae08f0764f8acb6b075846c8bf126f57b inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from the current wxChar type to Unicode.  <a href="#ae08f0764f8acb6b075846c8bf126f57b"></a><br/></td></tr>
<tr class="separator:ae08f0764f8acb6b075846c8bf126f57b inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4eec03d83e532986aca1e41ad472bb8 inherit pub_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classwx_w_char_buffer.html">wxWCharBuffer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#ab4eec03d83e532986aca1e41ad472bb8">cWX2WC</a> (const <a class="el" href="group__group__funcmacro__string.html#gad42f64d8c82f1ce4ae58773a89b2d6a7">wxChar</a> *psz) const </td></tr>
<tr class="memdesc:ab4eec03d83e532986aca1e41ad472bb8 inherit pub_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts from the current wxChar type to Unicode.  <a href="#ab4eec03d83e532986aca1e41ad472bb8"></a><br/></td></tr>
<tr class="separator:ab4eec03d83e532986aca1e41ad472bb8 inherit pub_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:af3751c63cbf505639501f8819318efdb"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_conv_auto.html#af3751c63cbf505639501f8819318efdb">DisableFallbackEncoding</a> ()</td></tr>
<tr class="memdesc:af3751c63cbf505639501f8819318efdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the use of the fall back encoding: if the input doesn't have a BOM and is not valid UTF-8, the conversion will fail.  <a href="#af3751c63cbf505639501f8819318efdb"></a><br/></td></tr>
<tr class="separator:af3751c63cbf505639501f8819318efdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7dc2532ac7a49fddf4da770b1a814abd"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439acca">wxFontEncoding</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_conv_auto.html#a7dc2532ac7a49fddf4da770b1a814abd">GetFallbackEncoding</a> ()</td></tr>
<tr class="memdesc:a7dc2532ac7a49fddf4da770b1a814abd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the encoding used by default by <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> if no other encoding is explicitly specified in constructor.  <a href="#a7dc2532ac7a49fddf4da770b1a814abd"></a><br/></td></tr>
<tr class="separator:a7dc2532ac7a49fddf4da770b1a814abd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c3f9760a2ae03fbf4748423367e7903"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_conv_auto.html#a5c3f9760a2ae03fbf4748423367e7903">SetFallbackEncoding</a> (<a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439acca">wxFontEncoding</a> enc)</td></tr>
<tr class="memdesc:a5c3f9760a2ae03fbf4748423367e7903"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the encoding used by default by <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> if no other encoding is explicitly specified in constructor.  <a href="#a5c3f9760a2ae03fbf4748423367e7903"></a><br/></td></tr>
<tr class="separator:a5c3f9760a2ae03fbf4748423367e7903"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51eb3693a422ca8712ae9d168dace637"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="convauto_8h.html#af393832da543c9238919f38be4536f60">wxBOM</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_conv_auto.html#a51eb3693a422ca8712ae9d168dace637">DetectBOM</a> (const char *src, size_t srcLen)</td></tr>
<tr class="memdesc:a51eb3693a422ca8712ae9d168dace637"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the BOM type of this buffer.  <a href="#a51eb3693a422ca8712ae9d168dace637"></a><br/></td></tr>
<tr class="separator:a51eb3693a422ca8712ae9d168dace637"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classwx_m_b_conv"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classwx_m_b_conv')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classwx_m_b_conv.html">wxMBConv</a></td></tr>
<tr class="memitem:a9d22d211135f265ed018e103590a61f0 inherit pub_static_methods_classwx_m_b_conv"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_m_b_conv.html#a9d22d211135f265ed018e103590a61f0">GetMaxMBNulLen</a> ()</td></tr>
<tr class="memdesc:a9d22d211135f265ed018e103590a61f0 inherit pub_static_methods_classwx_m_b_conv"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximal value which can be returned by <a class="el" href="classwx_m_b_conv.html#a2d6590cbcc686be76a9c4f1c071ff99f" title="This function returns 1 for most of the multibyte encodings in which the string is terminated by a si...">GetMBNulLen()</a> for any conversion object.  <a href="#a9d22d211135f265ed018e103590a61f0"></a><br/></td></tr>
<tr class="separator:a9d22d211135f265ed018e103590a61f0 inherit pub_static_methods_classwx_m_b_conv"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a88494409bdecddb4822470dd1ba8834a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxConvAuto::wxConvAuto </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439acca">wxFontEncoding</a>&#160;</td>
          <td class="paramname"><em>enc</em> = <code><a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439accaa8830ac2e2c3770c7a46be31c5340687f">wxFONTENCODING_DEFAULT</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructs a new <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> instance. </p>
<p>The object will try to detect the input of the multibyte text given to its <a class="el" href="classwx_m_b_conv.html#a22ad1976c06a540a95dfa878038d65f2" title="Convert multibyte string to a wide character one.">wxMBConv::ToWChar()</a> method automatically but if the automatic detection of Unicode encodings fails, the fall-back encoding <em>enc</em> will be used to interpret it as multibyte text.</p>
<p>The default value of <em>enc</em>, <code>wxFONTENCODING_DEFAULT</code>, means that the global default value (which can be set using <a class="el" href="classwx_conv_auto.html#a5c3f9760a2ae03fbf4748423367e7903" title="Changes the encoding used by default by wxConvAuto if no other encoding is explicitly specified in co...">SetFallbackEncoding()</a>) should be used. As with that method, passing <code>wxFONTENCODING_MAX</code> inhibits using this encoding completely so the input multibyte text will always be interpreted as UTF-8 in the absence of BOM and the conversion will fail if the input doesn't form valid UTF-8 sequence.</p>
<p>Another special value is <code>wxFONTENCODING_SYSTEM</code> which means to use the encoding currently used on the user system, i.e. the encoding returned by <a class="el" href="classwx_locale.html#aa807dd0db36c3bd6556c2a37014239d6" title="Tries to detect the user&#39;s default font encoding.">wxLocale::GetSystemEncoding()</a>. Any other encoding will be used as is, e.g. passing <code>wxFONTENCODING_ISO8859_1</code> ensures that non-UTF-8 input will be treated as latin1. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a51eb3693a422ca8712ae9d168dace637"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="convauto_8h.html#af393832da543c9238919f38be4536f60">wxBOM</a> wxConvAuto::DetectBOM </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>srcLen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the BOM type of this buffer. </p>
<p>This is a helper function which is normally only used internally by <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> but provided for convenience of the code that wants to detect the encoding of a stream by checking it for BOM presence on its own.</p>
<dl class="section since"><dt>Since</dt><dd>2.9.3 </dd></dl>

</div>
</div>
<a class="anchor" id="af3751c63cbf505639501f8819318efdb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void wxConvAuto::DisableFallbackEncoding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disable the use of the fall back encoding: if the input doesn't have a BOM and is not valid UTF-8, the conversion will fail. </p>

</div>
</div>
<a class="anchor" id="a0d64e621be1c3cd491c483f1f7559a85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="convauto_8h.html#af393832da543c9238919f38be4536f60">wxBOM</a> wxConvAuto::GetBOM </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the detected BOM type. </p>
<p>The BOM type is detected after sufficiently many initial bytes have passed through this conversion object so it will always return wxBOM_Unknown immediately after the object creation but may return a different value later.</p>
<dl class="section since"><dt>Since</dt><dd>2.9.3 </dd></dl>

</div>
</div>
<a class="anchor" id="a708201fd5509f31db43fb2e265432a7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* wxConvAuto::GetBOMChars </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="convauto_8h.html#af393832da543c9238919f38be4536f60">wxBOM</a>&#160;</td>
          <td class="paramname"><em>bom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return a pointer to the characters that makes up this BOM. </p>
<p>The returned character count is 2, 3 or 4, or undefined if the return value is NULL.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bom</td><td>A valid BOM type, i.e. not wxBOM_Unknown or wxBOM_None. </td></tr>
    <tr><td class="paramname">count</td><td>A non-<span class="literal">NULL</span> pointer receiving the number of characters in this BOM. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to characters composing the BOM or <span class="literal">NULL</span> if BOM is unknown or invalid. Notice that the returned string is not NUL-terminated and may contain embedded NULs so <em>count</em> must be used to handle it correctly.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>2.9.3 </dd></dl>

</div>
</div>
<a class="anchor" id="a7dc2532ac7a49fddf4da770b1a814abd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439acca">wxFontEncoding</a> wxConvAuto::GetFallbackEncoding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the encoding used by default by <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> if no other encoding is explicitly specified in constructor. </p>
<p>By default, returns <code>wxFONTENCODING_ISO8859_1</code> but can be changed using <a class="el" href="classwx_conv_auto.html#a5c3f9760a2ae03fbf4748423367e7903" title="Changes the encoding used by default by wxConvAuto if no other encoding is explicitly specified in co...">SetFallbackEncoding()</a>. </p>

</div>
</div>
<a class="anchor" id="a5c3f9760a2ae03fbf4748423367e7903"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void wxConvAuto::SetFallbackEncoding </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interface_2wx_2font_8h.html#a09016a7497d1ec6defdf13fd6439acca">wxFontEncoding</a>&#160;</td>
          <td class="paramname"><em>enc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Changes the encoding used by default by <a class="el" href="classwx_conv_auto.html" title="This class implements a Unicode to/from multibyte converter capable of automatically recognizing the ...">wxConvAuto</a> if no other encoding is explicitly specified in constructor. </p>
<p>The default value, which can be retrieved using <a class="el" href="classwx_conv_auto.html#a7dc2532ac7a49fddf4da770b1a814abd" title="Returns the encoding used by default by wxConvAuto if no other encoding is explicitly specified in co...">GetFallbackEncoding()</a>, is <code>wxFONTENCODING_ISO8859_1</code>.</p>
<p>Special values of <code>wxFONTENCODING_SYSTEM</code> or <code>wxFONTENCODING_MAX</code> can be used for the <em>enc</em> parameter to use the encoding of the current user locale as fall back or not use any encoding for fall back at all, respectively (just as with the similar constructor parameter). However, <code>wxFONTENCODING_DEFAULT</code> can't be used here. </p>

</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:45 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>