+static int UnknownEncodingHnd(void * WXUNUSED(encodingHandlerData),
+ const XML_Char *name, XML_Encoding *info)
+{
+ // We must build conversion table for expat. The easiest way to do so
+ // is to let wxCSConv convert as string containing all characters to
+ // wide character representation:
+ wxCSConv conv(name);
+ char mbBuf[255];
+ wchar_t wcBuf[255];
+ size_t i;
+
+ for (i = 0; i < 255; i++)
+ mbBuf[i] = i+1;
+ mbBuf[255] = 0;
+ conv.MB2WC(wcBuf, mbBuf, 255);
+ wcBuf[255] = 0;
+
+ info->map[0] = 0;
+ for (i = 0; i < 255; i++)
+ info->map[i+1] = (int)wcBuf[i];
+
+ info->data = NULL;
+ info->convert = NULL;
+ info->release = NULL;
+
+ return 1;
+}
+
+bool wxXmlIOHandlerExpat::Load(wxInputStream& stream, wxXmlDocument& doc,
+ const wxString& encoding)