| | 57 | }; |
|---|
| | 58 | |
|---|
| | 59 | void |
|---|
| | 60 | XMLArchive::updateEncoding() { |
|---|
| | 61 | if (mDocument->encoding == NULL) |
|---|
| | 62 | return; |
|---|
| | 63 | if (xmlStrcasecmp((xmlChar*)"utf-8",mDocument->encoding) == 0) |
|---|
| | 64 | mConvSpecs.mDbCharset = ConvSpec::UTF8; |
|---|
| | 65 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-1",mDocument->encoding) == 0) |
|---|
| | 66 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_1; |
|---|
| | 67 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-2",mDocument->encoding) == 0) |
|---|
| | 68 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_2; |
|---|
| | 69 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-3",mDocument->encoding) == 0) |
|---|
| | 70 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_3; |
|---|
| | 71 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-4",mDocument->encoding) == 0) |
|---|
| | 72 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_4; |
|---|
| | 73 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-5",mDocument->encoding) == 0) |
|---|
| | 74 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_5; |
|---|
| | 75 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-6",mDocument->encoding) == 0) |
|---|
| | 76 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_6; |
|---|
| | 77 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-7",mDocument->encoding) == 0) |
|---|
| | 78 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_7; |
|---|
| | 79 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-8",mDocument->encoding) == 0) |
|---|
| | 80 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_8; |
|---|
| | 81 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-9",mDocument->encoding) == 0) |
|---|
| | 82 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_9; |
|---|
| | 83 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-10",mDocument->encoding) == 0) |
|---|
| | 84 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_10; |
|---|
| | 85 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-11",mDocument->encoding) == 0) |
|---|
| | 86 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_11; |
|---|
| | 87 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-13",mDocument->encoding) == 0) |
|---|
| | 88 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_13; |
|---|
| | 89 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-14",mDocument->encoding) == 0) |
|---|
| | 90 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_14; |
|---|
| | 91 | else if (xmlStrcasecmp((xmlChar*)"iso-8859-15",mDocument->encoding) == 0) |
|---|
| | 92 | mConvSpecs.mDbCharset = ConvSpec::ISO8859_15; |
|---|
| | 93 | else if (xmlStrcasecmp((xmlChar*)"win-1250",mDocument->encoding) == 0) |
|---|
| | 94 | mConvSpecs.mDbCharset = ConvSpec::CP1250; |
|---|
| | 95 | else if (xmlStrcasecmp((xmlChar*)"win-1251",mDocument->encoding) == 0) |
|---|
| | 96 | mConvSpecs.mDbCharset = ConvSpec::CP1251; |
|---|
| | 97 | else if (xmlStrcasecmp((xmlChar*)"win-1252",mDocument->encoding) == 0) |
|---|
| | 98 | mConvSpecs.mDbCharset = ConvSpec::CP1252; |
|---|
| | 99 | else if (xmlStrcasecmp((xmlChar*)"win-1254",mDocument->encoding) == 0) |
|---|
| | 100 | mConvSpecs.mDbCharset = ConvSpec::CP1254; |
|---|
| | 101 | else if (xmlStrcasecmp((xmlChar*)"win-1255",mDocument->encoding) == 0) |
|---|
| | 102 | mConvSpecs.mDbCharset = ConvSpec::CP1255; |
|---|
| | 103 | else if (xmlStrcasecmp((xmlChar*)"win-1256",mDocument->encoding) == 0) |
|---|
| | 104 | mConvSpecs.mDbCharset = ConvSpec::CP1256; |
|---|