1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 25 // MARKER(update_precomp.py): autogen include statement, do not remove 26 #include "precompiled_sal.hxx" 27 #include <string.h> 28 29 #include <osl/thread.h> 30 #include <rtl/tencinfo.h> 31 32 #include <testshl/simpleheader.hxx> 33 34 // ----------------------------------------------------------------------------- 35 36 namespace rtl_tencinfo 37 { 38 class getBestMime : public CppUnit::TestFixture 39 { 40 public: setUp()41 void setUp() 42 { 43 } 44 check(const sal_Char * _pRTL_TEXTENCODING,rtl_TextEncoding _aCurrentEncode)45 void check( const sal_Char* _pRTL_TEXTENCODING, rtl_TextEncoding _aCurrentEncode ) 46 { 47 const sal_Char *pCharSet = rtl_getBestMimeCharsetFromTextEncoding( _aCurrentEncode ); 48 if (pCharSet == 0) 49 { 50 t_print("rtl_getBestMimeCharsetFromTextEncoding(%s) (%d) doesn't seem to exist.\n\n", _pRTL_TEXTENCODING, _aCurrentEncode); 51 } 52 else 53 { 54 t_print(T_VERBOSE, "'%s' is charset: '%s'\n", _pRTL_TEXTENCODING, pCharSet); 55 56 rtl_TextEncoding eTextEnc = rtl_getTextEncodingFromMimeCharset( pCharSet ); 57 if (_aCurrentEncode != eTextEnc && 58 eTextEnc != RTL_TEXTENCODING_DONTKNOW) 59 { 60 t_print("rtl_getBestMimeCharsetFromTextEncoding(%s) is charset: %s\n", _pRTL_TEXTENCODING, pCharSet); 61 t_print("rtl_getTextEncodingFromMimeCharset() differ: %s %d -> %d\n\n", _pRTL_TEXTENCODING, _aCurrentEncode, eTextEnc ); 62 } 63 // rtl::OString sError = "getTextEncodingFromMimeCharset("; 64 // sError += pCharSet; 65 // sError += ") returns null"; 66 // CPPUNIT_ASSERT_MESSAGE(sError.getStr(), eTextEnc != RTL_TEXTENCODING_DONTKNOW); 67 // CPPUNIT_ASSERT_MESSAGE("Does not realize itself", _aCurrentEncode == eTextEnc ); 68 } 69 } 70 71 // the defines for the follows test could be found in file inc/rtl/textenc.h 72 73 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1252()74 void MimeCharsetFromTextEncoding_MS_1252() 75 { 76 check( "RTL_TEXTENCODING_MS_1252", RTL_TEXTENCODING_MS_1252 ); 77 } 78 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_ROMAN()79 void MimeCharsetFromTextEncoding_APPLE_ROMAN() 80 { 81 check( "RTL_TEXTENCODING_APPLE_ROMAN", RTL_TEXTENCODING_APPLE_ROMAN ); 82 } 83 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_437()84 void MimeCharsetFromTextEncoding_IBM_437() 85 { 86 check( "RTL_TEXTENCODING_IBM_437", RTL_TEXTENCODING_IBM_437 ); 87 } 88 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_850()89 void MimeCharsetFromTextEncoding_IBM_850() 90 { 91 check( "RTL_TEXTENCODING_IBM_850", RTL_TEXTENCODING_IBM_850 ); 92 } 93 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_860()94 void MimeCharsetFromTextEncoding_IBM_860() 95 { 96 check( "RTL_TEXTENCODING_IBM_860", RTL_TEXTENCODING_IBM_860 ); 97 } 98 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_861()99 void MimeCharsetFromTextEncoding_IBM_861() 100 { 101 check( "RTL_TEXTENCODING_IBM_861", RTL_TEXTENCODING_IBM_861 ); 102 } 103 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_863()104 void MimeCharsetFromTextEncoding_IBM_863() 105 { 106 check( "RTL_TEXTENCODING_IBM_863", RTL_TEXTENCODING_IBM_863 ); 107 } 108 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_865()109 void MimeCharsetFromTextEncoding_IBM_865() 110 { 111 check( "RTL_TEXTENCODING_IBM_865", RTL_TEXTENCODING_IBM_865 ); 112 } 113 // ---------------------------------------- MimeCharsetFromTextEncoding_SYMBOL()114 void MimeCharsetFromTextEncoding_SYMBOL() 115 { 116 check( "RTL_TEXTENCODING_SYMBOL", RTL_TEXTENCODING_SYMBOL ); 117 } 118 // ---------------------------------------- MimeCharsetFromTextEncoding_ASCII_US()119 void MimeCharsetFromTextEncoding_ASCII_US() 120 { 121 check( "RTL_TEXTENCODING_ASCII_US", RTL_TEXTENCODING_ASCII_US ); 122 } 123 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_1()124 void MimeCharsetFromTextEncoding_ISO_8859_1() 125 { 126 check( "RTL_TEXTENCODING_ISO_8859_1", RTL_TEXTENCODING_ISO_8859_1 ); 127 } 128 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_2()129 void MimeCharsetFromTextEncoding_ISO_8859_2() 130 { 131 check( "RTL_TEXTENCODING_ISO_8859_2", RTL_TEXTENCODING_ISO_8859_2 ); 132 } 133 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_3()134 void MimeCharsetFromTextEncoding_ISO_8859_3() 135 { 136 check( "RTL_TEXTENCODING_ISO_8859_3", RTL_TEXTENCODING_ISO_8859_3 ); 137 } 138 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_4()139 void MimeCharsetFromTextEncoding_ISO_8859_4() 140 { 141 check( "RTL_TEXTENCODING_ISO_8859_4", RTL_TEXTENCODING_ISO_8859_4 ); 142 } 143 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_5()144 void MimeCharsetFromTextEncoding_ISO_8859_5() 145 { 146 check( "RTL_TEXTENCODING_ISO_8859_5", RTL_TEXTENCODING_ISO_8859_5 ); 147 } 148 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_6()149 void MimeCharsetFromTextEncoding_ISO_8859_6() 150 { 151 check( "RTL_TEXTENCODING_ISO_8859_6", RTL_TEXTENCODING_ISO_8859_6 ); 152 } 153 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_7()154 void MimeCharsetFromTextEncoding_ISO_8859_7() 155 { 156 check( "RTL_TEXTENCODING_ISO_8859_7", RTL_TEXTENCODING_ISO_8859_7 ); 157 } 158 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_8()159 void MimeCharsetFromTextEncoding_ISO_8859_8() 160 { 161 check( "RTL_TEXTENCODING_ISO_8859_8", RTL_TEXTENCODING_ISO_8859_8 ); 162 } 163 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_9()164 void MimeCharsetFromTextEncoding_ISO_8859_9() 165 { 166 check( "RTL_TEXTENCODING_ISO_8859_9", RTL_TEXTENCODING_ISO_8859_9 ); 167 } 168 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_14()169 void MimeCharsetFromTextEncoding_ISO_8859_14() 170 { 171 check( "RTL_TEXTENCODING_ISO_8859_14", RTL_TEXTENCODING_ISO_8859_14 ); 172 } 173 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_15()174 void MimeCharsetFromTextEncoding_ISO_8859_15() 175 { 176 check( "RTL_TEXTENCODING_ISO_8859_15", RTL_TEXTENCODING_ISO_8859_15 ); 177 } 178 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_737()179 void MimeCharsetFromTextEncoding_IBM_737() 180 { 181 check( "RTL_TEXTENCODING_IBM_737", RTL_TEXTENCODING_IBM_737 ); 182 } 183 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_775()184 void MimeCharsetFromTextEncoding_IBM_775() 185 { 186 check( "RTL_TEXTENCODING_IBM_775", RTL_TEXTENCODING_IBM_775 ); 187 } 188 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_852()189 void MimeCharsetFromTextEncoding_IBM_852() 190 { 191 check( "RTL_TEXTENCODING_IBM_852", RTL_TEXTENCODING_IBM_852 ); 192 } 193 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_855()194 void MimeCharsetFromTextEncoding_IBM_855() 195 { 196 check( "RTL_TEXTENCODING_IBM_855", RTL_TEXTENCODING_IBM_855 ); 197 } 198 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_857()199 void MimeCharsetFromTextEncoding_IBM_857() 200 { 201 check( "RTL_TEXTENCODING_IBM_857", RTL_TEXTENCODING_IBM_857 ); 202 } 203 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_862()204 void MimeCharsetFromTextEncoding_IBM_862() 205 { 206 check( "RTL_TEXTENCODING_IBM_862", RTL_TEXTENCODING_IBM_862 ); 207 } 208 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_864()209 void MimeCharsetFromTextEncoding_IBM_864() 210 { 211 check( "RTL_TEXTENCODING_IBM_864", RTL_TEXTENCODING_IBM_864 ); 212 } 213 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_866()214 void MimeCharsetFromTextEncoding_IBM_866() 215 { 216 check( "RTL_TEXTENCODING_IBM_866", RTL_TEXTENCODING_IBM_866 ); 217 } 218 // ---------------------------------------- MimeCharsetFromTextEncoding_IBM_869()219 void MimeCharsetFromTextEncoding_IBM_869() 220 { 221 check( "RTL_TEXTENCODING_IBM_869", RTL_TEXTENCODING_IBM_869 ); 222 } 223 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_874()224 void MimeCharsetFromTextEncoding_MS_874() 225 { 226 check( "RTL_TEXTENCODING_MS_874", RTL_TEXTENCODING_MS_874 ); 227 } 228 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1250()229 void MimeCharsetFromTextEncoding_MS_1250() 230 { 231 check( "RTL_TEXTENCODING_MS_1250", RTL_TEXTENCODING_MS_1250 ); 232 } 233 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1251()234 void MimeCharsetFromTextEncoding_MS_1251() 235 { 236 check( "RTL_TEXTENCODING_MS_1251", RTL_TEXTENCODING_MS_1251 ); 237 } 238 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1253()239 void MimeCharsetFromTextEncoding_MS_1253() 240 { 241 check( "RTL_TEXTENCODING_MS_1253", RTL_TEXTENCODING_MS_1253 ); 242 } 243 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1254()244 void MimeCharsetFromTextEncoding_MS_1254() 245 { 246 check( "RTL_TEXTENCODING_MS_1254", RTL_TEXTENCODING_MS_1254 ); 247 } 248 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1255()249 void MimeCharsetFromTextEncoding_MS_1255() 250 { 251 check( "RTL_TEXTENCODING_MS_1255", RTL_TEXTENCODING_MS_1255 ); 252 } 253 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1256()254 void MimeCharsetFromTextEncoding_MS_1256() 255 { 256 check( "RTL_TEXTENCODING_MS_1256", RTL_TEXTENCODING_MS_1256 ); 257 } 258 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1257()259 void MimeCharsetFromTextEncoding_MS_1257() 260 { 261 check( "RTL_TEXTENCODING_MS_1257", RTL_TEXTENCODING_MS_1257 ); 262 } 263 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1258()264 void MimeCharsetFromTextEncoding_MS_1258() 265 { 266 check( "RTL_TEXTENCODING_MS_1258", RTL_TEXTENCODING_MS_1258 ); 267 } 268 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_ARABIC()269 void MimeCharsetFromTextEncoding_APPLE_ARABIC() 270 { 271 check( "RTL_TEXTENCODING_APPLE_ARABIC", RTL_TEXTENCODING_APPLE_ARABIC ); 272 } 273 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_CENTEURO()274 void MimeCharsetFromTextEncoding_APPLE_CENTEURO() 275 { 276 check( "RTL_TEXTENCODING_APPLE_CENTEURO", RTL_TEXTENCODING_APPLE_CENTEURO ); 277 } 278 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_CROATIAN()279 void MimeCharsetFromTextEncoding_APPLE_CROATIAN() 280 { 281 check( "RTL_TEXTENCODING_APPLE_CROATIAN", RTL_TEXTENCODING_APPLE_CROATIAN ); 282 } 283 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_CYRILLIC()284 void MimeCharsetFromTextEncoding_APPLE_CYRILLIC() 285 { 286 check( "RTL_TEXTENCODING_APPLE_CYRILLIC", RTL_TEXTENCODING_APPLE_CYRILLIC ); 287 } 288 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_DEVANAGARI()289 void MimeCharsetFromTextEncoding_APPLE_DEVANAGARI() 290 { 291 check( "RTL_TEXTENCODING_APPLE_DEVANAGARI", RTL_TEXTENCODING_APPLE_DEVANAGARI ); 292 } 293 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_FARSI()294 void MimeCharsetFromTextEncoding_APPLE_FARSI() 295 { 296 check( "RTL_TEXTENCODING_APPLE_FARSI", RTL_TEXTENCODING_APPLE_FARSI ); 297 } 298 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_GREEK()299 void MimeCharsetFromTextEncoding_APPLE_GREEK() 300 { 301 check( "RTL_TEXTENCODING_APPLE_GREEK", RTL_TEXTENCODING_APPLE_GREEK ); 302 } 303 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_GUJARATI()304 void MimeCharsetFromTextEncoding_APPLE_GUJARATI() 305 { 306 check( "RTL_TEXTENCODING_APPLE_GUJARATI", RTL_TEXTENCODING_APPLE_GUJARATI ); 307 } 308 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_GURMUKHI()309 void MimeCharsetFromTextEncoding_APPLE_GURMUKHI() 310 { 311 check( "RTL_TEXTENCODING_APPLE_GURMUKHI", RTL_TEXTENCODING_APPLE_GURMUKHI ); 312 } 313 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_HEBREW()314 void MimeCharsetFromTextEncoding_APPLE_HEBREW() 315 { 316 check( "RTL_TEXTENCODING_APPLE_HEBREW", RTL_TEXTENCODING_APPLE_HEBREW ); 317 } 318 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_ICELAND()319 void MimeCharsetFromTextEncoding_APPLE_ICELAND() 320 { 321 check( "RTL_TEXTENCODING_APPLE_ICELAND", RTL_TEXTENCODING_APPLE_ICELAND ); 322 } 323 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_ROMANIAN()324 void MimeCharsetFromTextEncoding_APPLE_ROMANIAN() 325 { 326 check( "RTL_TEXTENCODING_APPLE_ROMANIAN", RTL_TEXTENCODING_APPLE_ROMANIAN ); 327 } 328 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_THAI()329 void MimeCharsetFromTextEncoding_APPLE_THAI() 330 { 331 check( "RTL_TEXTENCODING_APPLE_THAI", RTL_TEXTENCODING_APPLE_THAI ); 332 } 333 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_TURKISH()334 void MimeCharsetFromTextEncoding_APPLE_TURKISH() 335 { 336 check( "RTL_TEXTENCODING_APPLE_TURKISH", RTL_TEXTENCODING_APPLE_TURKISH ); 337 } 338 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_UKRAINIAN()339 void MimeCharsetFromTextEncoding_APPLE_UKRAINIAN() 340 { 341 check( "RTL_TEXTENCODING_APPLE_UKRAINIAN", RTL_TEXTENCODING_APPLE_UKRAINIAN ); 342 } 343 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_CHINSIMP()344 void MimeCharsetFromTextEncoding_APPLE_CHINSIMP() 345 { 346 check( "RTL_TEXTENCODING_APPLE_CHINSIMP", RTL_TEXTENCODING_APPLE_CHINSIMP ); 347 } 348 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_CHINTRAD()349 void MimeCharsetFromTextEncoding_APPLE_CHINTRAD() 350 { 351 check( "RTL_TEXTENCODING_APPLE_CHINTRAD", RTL_TEXTENCODING_APPLE_CHINTRAD ); 352 } 353 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_JAPANESE()354 void MimeCharsetFromTextEncoding_APPLE_JAPANESE() 355 { 356 check( "RTL_TEXTENCODING_APPLE_JAPANESE", RTL_TEXTENCODING_APPLE_JAPANESE ); 357 } 358 // ---------------------------------------- MimeCharsetFromTextEncoding_APPLE_KOREAN()359 void MimeCharsetFromTextEncoding_APPLE_KOREAN() 360 { 361 check( "RTL_TEXTENCODING_APPLE_KOREAN", RTL_TEXTENCODING_APPLE_KOREAN ); 362 } 363 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_932()364 void MimeCharsetFromTextEncoding_MS_932() 365 { 366 check( "RTL_TEXTENCODING_MS_932", RTL_TEXTENCODING_MS_932 ); 367 } 368 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_936()369 void MimeCharsetFromTextEncoding_MS_936() 370 { 371 check( "RTL_TEXTENCODING_MS_936", RTL_TEXTENCODING_MS_936 ); 372 } 373 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_949()374 void MimeCharsetFromTextEncoding_MS_949() 375 { 376 check( "RTL_TEXTENCODING_MS_949", RTL_TEXTENCODING_MS_949 ); 377 } 378 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_950()379 void MimeCharsetFromTextEncoding_MS_950() 380 { 381 check( "RTL_TEXTENCODING_MS_950", RTL_TEXTENCODING_MS_950 ); 382 } 383 // ---------------------------------------- MimeCharsetFromTextEncoding_SHIFT_JIS()384 void MimeCharsetFromTextEncoding_SHIFT_JIS() 385 { 386 check( "RTL_TEXTENCODING_SHIFT_JIS", RTL_TEXTENCODING_SHIFT_JIS ); 387 } 388 // ---------------------------------------- MimeCharsetFromTextEncoding_GB_2312()389 void MimeCharsetFromTextEncoding_GB_2312() 390 { 391 check( "RTL_TEXTENCODING_GB_2312", RTL_TEXTENCODING_GB_2312 ); 392 } 393 // ---------------------------------------- MimeCharsetFromTextEncoding_GBT_12345()394 void MimeCharsetFromTextEncoding_GBT_12345() 395 { 396 check( "RTL_TEXTENCODING_GBT_12345", RTL_TEXTENCODING_GBT_12345 ); 397 } 398 // ---------------------------------------- MimeCharsetFromTextEncoding_GBK()399 void MimeCharsetFromTextEncoding_GBK() 400 { 401 check( "RTL_TEXTENCODING_GBK", RTL_TEXTENCODING_GBK ); 402 } 403 // ---------------------------------------- MimeCharsetFromTextEncoding_BIG5()404 void MimeCharsetFromTextEncoding_BIG5() 405 { 406 check( "RTL_TEXTENCODING_BIG5", RTL_TEXTENCODING_BIG5 ); 407 } 408 // ---------------------------------------- MimeCharsetFromTextEncoding_EUC_JP()409 void MimeCharsetFromTextEncoding_EUC_JP() 410 { 411 check( "RTL_TEXTENCODING_EUC_JP", RTL_TEXTENCODING_EUC_JP ); 412 } 413 // ---------------------------------------- MimeCharsetFromTextEncoding_EUC_CN()414 void MimeCharsetFromTextEncoding_EUC_CN() 415 { 416 check( "RTL_TEXTENCODING_EUC_CN", RTL_TEXTENCODING_EUC_CN ); 417 } 418 // ---------------------------------------- MimeCharsetFromTextEncoding_EUC_TW()419 void MimeCharsetFromTextEncoding_EUC_TW() 420 { 421 check( "RTL_TEXTENCODING_EUC_TW", RTL_TEXTENCODING_EUC_TW ); 422 } 423 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_2022_JP()424 void MimeCharsetFromTextEncoding_ISO_2022_JP() 425 { 426 check( "RTL_TEXTENCODING_ISO_2022_JP", RTL_TEXTENCODING_ISO_2022_JP ); 427 } 428 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_2022_CN()429 void MimeCharsetFromTextEncoding_ISO_2022_CN() 430 { 431 check( "RTL_TEXTENCODING_ISO_2022_CN", RTL_TEXTENCODING_ISO_2022_CN ); 432 } 433 // ---------------------------------------- MimeCharsetFromTextEncoding_KOI8_R()434 void MimeCharsetFromTextEncoding_KOI8_R() 435 { 436 check( "RTL_TEXTENCODING_KOI8_R", RTL_TEXTENCODING_KOI8_R ); 437 } 438 // ---------------------------------------- MimeCharsetFromTextEncoding_UTF7()439 void MimeCharsetFromTextEncoding_UTF7() 440 { 441 check( "RTL_TEXTENCODING_UTF7", RTL_TEXTENCODING_UTF7 ); 442 } 443 // ---------------------------------------- MimeCharsetFromTextEncoding_UTF8()444 void MimeCharsetFromTextEncoding_UTF8() 445 { 446 check( "RTL_TEXTENCODING_UTF8", RTL_TEXTENCODING_UTF8 ); 447 } 448 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_10()449 void MimeCharsetFromTextEncoding_ISO_8859_10() 450 { 451 check( "RTL_TEXTENCODING_ISO_8859_10", RTL_TEXTENCODING_ISO_8859_10 ); 452 } 453 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_8859_13()454 void MimeCharsetFromTextEncoding_ISO_8859_13() 455 { 456 check( "RTL_TEXTENCODING_ISO_8859_13", RTL_TEXTENCODING_ISO_8859_13 ); 457 } 458 // ---------------------------------------- MimeCharsetFromTextEncoding_EUC_KR()459 void MimeCharsetFromTextEncoding_EUC_KR() 460 { 461 check( "RTL_TEXTENCODING_EUC_KR", RTL_TEXTENCODING_EUC_KR ); 462 } 463 // ---------------------------------------- MimeCharsetFromTextEncoding_ISO_2022_KR()464 void MimeCharsetFromTextEncoding_ISO_2022_KR() 465 { 466 check( "RTL_TEXTENCODING_ISO_2022_KR", RTL_TEXTENCODING_ISO_2022_KR ); 467 } 468 // ---------------------------------------- MimeCharsetFromTextEncoding_JIS_X_0201()469 void MimeCharsetFromTextEncoding_JIS_X_0201() 470 { 471 check( "RTL_TEXTENCODING_JIS_X_0201", RTL_TEXTENCODING_JIS_X_0201 ); 472 } 473 // ---------------------------------------- MimeCharsetFromTextEncoding_JIS_X_0208()474 void MimeCharsetFromTextEncoding_JIS_X_0208() 475 { 476 check( "RTL_TEXTENCODING_JIS_X_0208", RTL_TEXTENCODING_JIS_X_0208 ); 477 } 478 // ---------------------------------------- MimeCharsetFromTextEncoding_JIS_X_0212()479 void MimeCharsetFromTextEncoding_JIS_X_0212() 480 { 481 check( "RTL_TEXTENCODING_JIS_X_0212", RTL_TEXTENCODING_JIS_X_0212 ); 482 } 483 // ---------------------------------------- MimeCharsetFromTextEncoding_MS_1361()484 void MimeCharsetFromTextEncoding_MS_1361() 485 { 486 check( "RTL_TEXTENCODING_MS_1361", RTL_TEXTENCODING_MS_1361 ); 487 } 488 // ---------------------------------------- MimeCharsetFromTextEncoding_GB_18030()489 void MimeCharsetFromTextEncoding_GB_18030() 490 { 491 check( "RTL_TEXTENCODING_GB_18030", RTL_TEXTENCODING_GB_18030 ); 492 } 493 // ---------------------------------------- MimeCharsetFromTextEncoding_BIG5_HKSCS()494 void MimeCharsetFromTextEncoding_BIG5_HKSCS() 495 { 496 check( "RTL_TEXTENCODING_BIG5_HKSCS", RTL_TEXTENCODING_BIG5_HKSCS ); 497 } 498 // ---------------------------------------- MimeCharsetFromTextEncoding_TIS_620()499 void MimeCharsetFromTextEncoding_TIS_620() 500 { 501 check( "RTL_TEXTENCODING_TIS_620", RTL_TEXTENCODING_TIS_620 ); 502 } 503 // ---------------------------------------- MimeCharsetFromTextEncoding_KOI8_U()504 void MimeCharsetFromTextEncoding_KOI8_U() 505 { 506 check( "RTL_TEXTENCODING_KOI8_U", RTL_TEXTENCODING_KOI8_U ); 507 } 508 // ---------------------------------------- MimeCharsetFromTextEncoding_ISCII_DEVANAGARI()509 void MimeCharsetFromTextEncoding_ISCII_DEVANAGARI() 510 { 511 check( "RTL_TEXTENCODING_ISCII_DEVANAGARI", RTL_TEXTENCODING_ISCII_DEVANAGARI ); 512 } 513 // ---------------------------------------- MimeCharsetFromTextEncoding_JAVA_UTF8()514 void MimeCharsetFromTextEncoding_JAVA_UTF8() 515 { 516 check( "RTL_TEXTENCODING_JAVA_UTF8", RTL_TEXTENCODING_JAVA_UTF8 ); 517 } 518 519 /* ATTENTION! Whenever some encoding is added here, make sure to update 520 * rtl_isOctetEncoding in tencinfo.c. 521 */ 522 523 // RTL_TEXTENCODING_USER_START 524 // RTL_TEXTENCODING_USER_END 525 526 // check( "RTL_TEXTENCODING_UCS4", RTL_TEXTENCODING_UCS4 ); 527 // check( "RTL_TEXTENCODING_UCS2", RTL_TEXTENCODING_UCS2 ); 528 // check( "RTL_TEXTENCODING_UNICODE", RTL_TEXTENCODING_UNICODE /* RTL_TEXTENCODING_UCS2 */ ); 529 530 CPPUNIT_TEST_SUITE( getBestMime ); 531 532 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1252 ); 533 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_ROMAN ); 534 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_437 ); 535 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_850 ); 536 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_860 ); 537 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_861 ); 538 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_863 ); 539 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_865 ); 540 CPPUNIT_TEST( MimeCharsetFromTextEncoding_SYMBOL ); 541 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ASCII_US ); 542 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_1 ); 543 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_2 ); 544 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_3 ); 545 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_4 ); 546 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_5 ); 547 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_6 ); 548 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_7 ); 549 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_8 ); 550 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_9 ); 551 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_14 ); 552 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_15 ); 553 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_737 ); 554 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_775 ); 555 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_852 ); 556 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_855 ); 557 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_857 ); 558 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_862 ); 559 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_864 ); 560 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_866 ); 561 CPPUNIT_TEST( MimeCharsetFromTextEncoding_IBM_869 ); 562 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_874 ); 563 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1250 ); 564 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1251 ); 565 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1253 ); 566 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1254 ); 567 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1255 ); 568 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1256 ); 569 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1257 ); 570 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1258 ); 571 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_ARABIC ); 572 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CENTEURO ); 573 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CROATIAN ); 574 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CYRILLIC ); 575 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_DEVANAGARI ); 576 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_FARSI ); 577 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_GREEK ); 578 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_GUJARATI ); 579 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_GURMUKHI ); 580 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_HEBREW ); 581 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_ICELAND ); 582 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_ROMANIAN ); 583 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_THAI ); 584 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_TURKISH ); 585 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_UKRAINIAN ); 586 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CHINSIMP ); 587 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_CHINTRAD ); 588 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_JAPANESE ); 589 CPPUNIT_TEST( MimeCharsetFromTextEncoding_APPLE_KOREAN ); 590 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_932 ); 591 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_936 ); 592 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_949 ); 593 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_950 ); 594 CPPUNIT_TEST( MimeCharsetFromTextEncoding_SHIFT_JIS ); 595 CPPUNIT_TEST( MimeCharsetFromTextEncoding_GB_2312 ); 596 CPPUNIT_TEST( MimeCharsetFromTextEncoding_GBT_12345 ); 597 CPPUNIT_TEST( MimeCharsetFromTextEncoding_GBK ); 598 CPPUNIT_TEST( MimeCharsetFromTextEncoding_BIG5 ); 599 CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_JP ); 600 CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_CN ); 601 CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_TW ); 602 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_JP ); 603 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_CN ); 604 CPPUNIT_TEST( MimeCharsetFromTextEncoding_KOI8_R ); 605 CPPUNIT_TEST( MimeCharsetFromTextEncoding_UTF7 ); 606 CPPUNIT_TEST( MimeCharsetFromTextEncoding_UTF8 ); 607 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_10 ); 608 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_8859_13 ); 609 CPPUNIT_TEST( MimeCharsetFromTextEncoding_EUC_KR ); 610 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISO_2022_KR ); 611 CPPUNIT_TEST( MimeCharsetFromTextEncoding_JIS_X_0201 ); 612 CPPUNIT_TEST( MimeCharsetFromTextEncoding_JIS_X_0208 ); 613 CPPUNIT_TEST( MimeCharsetFromTextEncoding_JIS_X_0212 ); 614 CPPUNIT_TEST( MimeCharsetFromTextEncoding_MS_1361 ); 615 CPPUNIT_TEST( MimeCharsetFromTextEncoding_GB_18030 ); 616 CPPUNIT_TEST( MimeCharsetFromTextEncoding_BIG5_HKSCS ); 617 CPPUNIT_TEST( MimeCharsetFromTextEncoding_TIS_620 ); 618 CPPUNIT_TEST( MimeCharsetFromTextEncoding_KOI8_U ); 619 CPPUNIT_TEST( MimeCharsetFromTextEncoding_ISCII_DEVANAGARI ); 620 CPPUNIT_TEST( MimeCharsetFromTextEncoding_JAVA_UTF8 ); 621 622 CPPUNIT_TEST_SUITE_END( ); 623 }; 624 625 // ----------------------------------------------------------------------------- 626 627 class getBestUnix : public CppUnit::TestFixture 628 { 629 public: setUp()630 void setUp() 631 { 632 } 633 check(const sal_Char * _pRTL_TEXTENCODING,rtl_TextEncoding _aCurrentEncode)634 void check( const sal_Char* _pRTL_TEXTENCODING, rtl_TextEncoding _aCurrentEncode ) 635 { 636 const sal_Char *pCharSet = rtl_getBestUnixCharsetFromTextEncoding( _aCurrentEncode ); 637 if (pCharSet == 0) 638 { 639 t_print("rtl_getBestUnixCharsetFromTextEncoding(%s) (%d) doesn't seem to exist.\n\n", _pRTL_TEXTENCODING, _aCurrentEncode); 640 } 641 else 642 { 643 t_print(T_VERBOSE, "'%s' is charset: '%s'\n", _pRTL_TEXTENCODING, pCharSet); 644 645 rtl_TextEncoding eTextEnc = rtl_getTextEncodingFromUnixCharset( pCharSet ); 646 if (_aCurrentEncode != eTextEnc && 647 eTextEnc != RTL_TEXTENCODING_DONTKNOW) 648 { 649 t_print("rtl_getBestUnixCharsetFromTextEncoding(%s) is charset: %s\n", _pRTL_TEXTENCODING, pCharSet); 650 t_print("rtl_getTextEncodingFromUnixCharset() differ: %s %d -> %d\n\n", _pRTL_TEXTENCODING, _aCurrentEncode, eTextEnc ); 651 } 652 // rtl::OString sError = "getTextEncodingFromUnixCharset("; 653 // sError += pCharSet; 654 // sError += ") returns null"; 655 // CPPUNIT_ASSERT_MESSAGE(sError.getStr(), eTextEnc != RTL_TEXTENCODING_DONTKNOW); 656 // CPPUNIT_ASSERT_MESSAGE("Does not realize itself", _aCurrentEncode == eTextEnc ); 657 } 658 } 659 660 661 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1252()662 void UnixCharsetFromTextEncoding_MS_1252() 663 { 664 check( "RTL_TEXTENCODING_MS_1252", RTL_TEXTENCODING_MS_1252 ); 665 } 666 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_ROMAN()667 void UnixCharsetFromTextEncoding_APPLE_ROMAN() 668 { 669 check( "RTL_TEXTENCODING_APPLE_ROMAN", RTL_TEXTENCODING_APPLE_ROMAN ); 670 } 671 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_437()672 void UnixCharsetFromTextEncoding_IBM_437() 673 { 674 check( "RTL_TEXTENCODING_IBM_437", RTL_TEXTENCODING_IBM_437 ); 675 } 676 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_850()677 void UnixCharsetFromTextEncoding_IBM_850() 678 { 679 check( "RTL_TEXTENCODING_IBM_850", RTL_TEXTENCODING_IBM_850 ); 680 } 681 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_860()682 void UnixCharsetFromTextEncoding_IBM_860() 683 { 684 check( "RTL_TEXTENCODING_IBM_860", RTL_TEXTENCODING_IBM_860 ); 685 } 686 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_861()687 void UnixCharsetFromTextEncoding_IBM_861() 688 { 689 check( "RTL_TEXTENCODING_IBM_861", RTL_TEXTENCODING_IBM_861 ); 690 } 691 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_863()692 void UnixCharsetFromTextEncoding_IBM_863() 693 { 694 check( "RTL_TEXTENCODING_IBM_863", RTL_TEXTENCODING_IBM_863 ); 695 } 696 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_865()697 void UnixCharsetFromTextEncoding_IBM_865() 698 { 699 check( "RTL_TEXTENCODING_IBM_865", RTL_TEXTENCODING_IBM_865 ); 700 } 701 // ---------------------------------------- UnixCharsetFromTextEncoding_SYMBOL()702 void UnixCharsetFromTextEncoding_SYMBOL() 703 { 704 check( "RTL_TEXTENCODING_SYMBOL", RTL_TEXTENCODING_SYMBOL ); 705 } 706 // ---------------------------------------- UnixCharsetFromTextEncoding_ASCII_US()707 void UnixCharsetFromTextEncoding_ASCII_US() 708 { 709 check( "RTL_TEXTENCODING_ASCII_US", RTL_TEXTENCODING_ASCII_US ); 710 } 711 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_1()712 void UnixCharsetFromTextEncoding_ISO_8859_1() 713 { 714 check( "RTL_TEXTENCODING_ISO_8859_1", RTL_TEXTENCODING_ISO_8859_1 ); 715 } 716 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_2()717 void UnixCharsetFromTextEncoding_ISO_8859_2() 718 { 719 check( "RTL_TEXTENCODING_ISO_8859_2", RTL_TEXTENCODING_ISO_8859_2 ); 720 } 721 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_3()722 void UnixCharsetFromTextEncoding_ISO_8859_3() 723 { 724 check( "RTL_TEXTENCODING_ISO_8859_3", RTL_TEXTENCODING_ISO_8859_3 ); 725 } 726 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_4()727 void UnixCharsetFromTextEncoding_ISO_8859_4() 728 { 729 check( "RTL_TEXTENCODING_ISO_8859_4", RTL_TEXTENCODING_ISO_8859_4 ); 730 } 731 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_5()732 void UnixCharsetFromTextEncoding_ISO_8859_5() 733 { 734 check( "RTL_TEXTENCODING_ISO_8859_5", RTL_TEXTENCODING_ISO_8859_5 ); 735 } 736 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_6()737 void UnixCharsetFromTextEncoding_ISO_8859_6() 738 { 739 check( "RTL_TEXTENCODING_ISO_8859_6", RTL_TEXTENCODING_ISO_8859_6 ); 740 } 741 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_7()742 void UnixCharsetFromTextEncoding_ISO_8859_7() 743 { 744 check( "RTL_TEXTENCODING_ISO_8859_7", RTL_TEXTENCODING_ISO_8859_7 ); 745 } 746 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_8()747 void UnixCharsetFromTextEncoding_ISO_8859_8() 748 { 749 check( "RTL_TEXTENCODING_ISO_8859_8", RTL_TEXTENCODING_ISO_8859_8 ); 750 } 751 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_9()752 void UnixCharsetFromTextEncoding_ISO_8859_9() 753 { 754 check( "RTL_TEXTENCODING_ISO_8859_9", RTL_TEXTENCODING_ISO_8859_9 ); 755 } 756 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_14()757 void UnixCharsetFromTextEncoding_ISO_8859_14() 758 { 759 check( "RTL_TEXTENCODING_ISO_8859_14", RTL_TEXTENCODING_ISO_8859_14 ); 760 } 761 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_15()762 void UnixCharsetFromTextEncoding_ISO_8859_15() 763 { 764 check( "RTL_TEXTENCODING_ISO_8859_15", RTL_TEXTENCODING_ISO_8859_15 ); 765 } 766 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_737()767 void UnixCharsetFromTextEncoding_IBM_737() 768 { 769 check( "RTL_TEXTENCODING_IBM_737", RTL_TEXTENCODING_IBM_737 ); 770 } 771 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_775()772 void UnixCharsetFromTextEncoding_IBM_775() 773 { 774 check( "RTL_TEXTENCODING_IBM_775", RTL_TEXTENCODING_IBM_775 ); 775 } 776 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_852()777 void UnixCharsetFromTextEncoding_IBM_852() 778 { 779 check( "RTL_TEXTENCODING_IBM_852", RTL_TEXTENCODING_IBM_852 ); 780 } 781 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_855()782 void UnixCharsetFromTextEncoding_IBM_855() 783 { 784 check( "RTL_TEXTENCODING_IBM_855", RTL_TEXTENCODING_IBM_855 ); 785 } 786 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_857()787 void UnixCharsetFromTextEncoding_IBM_857() 788 { 789 check( "RTL_TEXTENCODING_IBM_857", RTL_TEXTENCODING_IBM_857 ); 790 } 791 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_862()792 void UnixCharsetFromTextEncoding_IBM_862() 793 { 794 check( "RTL_TEXTENCODING_IBM_862", RTL_TEXTENCODING_IBM_862 ); 795 } 796 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_864()797 void UnixCharsetFromTextEncoding_IBM_864() 798 { 799 check( "RTL_TEXTENCODING_IBM_864", RTL_TEXTENCODING_IBM_864 ); 800 } 801 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_866()802 void UnixCharsetFromTextEncoding_IBM_866() 803 { 804 check( "RTL_TEXTENCODING_IBM_866", RTL_TEXTENCODING_IBM_866 ); 805 } 806 // ---------------------------------------- UnixCharsetFromTextEncoding_IBM_869()807 void UnixCharsetFromTextEncoding_IBM_869() 808 { 809 check( "RTL_TEXTENCODING_IBM_869", RTL_TEXTENCODING_IBM_869 ); 810 } 811 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_874()812 void UnixCharsetFromTextEncoding_MS_874() 813 { 814 check( "RTL_TEXTENCODING_MS_874", RTL_TEXTENCODING_MS_874 ); 815 } 816 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1250()817 void UnixCharsetFromTextEncoding_MS_1250() 818 { 819 check( "RTL_TEXTENCODING_MS_1250", RTL_TEXTENCODING_MS_1250 ); 820 } 821 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1251()822 void UnixCharsetFromTextEncoding_MS_1251() 823 { 824 check( "RTL_TEXTENCODING_MS_1251", RTL_TEXTENCODING_MS_1251 ); 825 } 826 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1253()827 void UnixCharsetFromTextEncoding_MS_1253() 828 { 829 check( "RTL_TEXTENCODING_MS_1253", RTL_TEXTENCODING_MS_1253 ); 830 } 831 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1254()832 void UnixCharsetFromTextEncoding_MS_1254() 833 { 834 check( "RTL_TEXTENCODING_MS_1254", RTL_TEXTENCODING_MS_1254 ); 835 } 836 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1255()837 void UnixCharsetFromTextEncoding_MS_1255() 838 { 839 check( "RTL_TEXTENCODING_MS_1255", RTL_TEXTENCODING_MS_1255 ); 840 } 841 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1256()842 void UnixCharsetFromTextEncoding_MS_1256() 843 { 844 check( "RTL_TEXTENCODING_MS_1256", RTL_TEXTENCODING_MS_1256 ); 845 } 846 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1257()847 void UnixCharsetFromTextEncoding_MS_1257() 848 { 849 check( "RTL_TEXTENCODING_MS_1257", RTL_TEXTENCODING_MS_1257 ); 850 } 851 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1258()852 void UnixCharsetFromTextEncoding_MS_1258() 853 { 854 check( "RTL_TEXTENCODING_MS_1258", RTL_TEXTENCODING_MS_1258 ); 855 } 856 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_ARABIC()857 void UnixCharsetFromTextEncoding_APPLE_ARABIC() 858 { 859 check( "RTL_TEXTENCODING_APPLE_ARABIC", RTL_TEXTENCODING_APPLE_ARABIC ); 860 } 861 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_CENTEURO()862 void UnixCharsetFromTextEncoding_APPLE_CENTEURO() 863 { 864 check( "RTL_TEXTENCODING_APPLE_CENTEURO", RTL_TEXTENCODING_APPLE_CENTEURO ); 865 } 866 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_CROATIAN()867 void UnixCharsetFromTextEncoding_APPLE_CROATIAN() 868 { 869 check( "RTL_TEXTENCODING_APPLE_CROATIAN", RTL_TEXTENCODING_APPLE_CROATIAN ); 870 } 871 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_CYRILLIC()872 void UnixCharsetFromTextEncoding_APPLE_CYRILLIC() 873 { 874 check( "RTL_TEXTENCODING_APPLE_CYRILLIC", RTL_TEXTENCODING_APPLE_CYRILLIC ); 875 } 876 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_DEVANAGARI()877 void UnixCharsetFromTextEncoding_APPLE_DEVANAGARI() 878 { 879 check( "RTL_TEXTENCODING_APPLE_DEVANAGARI", RTL_TEXTENCODING_APPLE_DEVANAGARI ); 880 } 881 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_FARSI()882 void UnixCharsetFromTextEncoding_APPLE_FARSI() 883 { 884 check( "RTL_TEXTENCODING_APPLE_FARSI", RTL_TEXTENCODING_APPLE_FARSI ); 885 } 886 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_GREEK()887 void UnixCharsetFromTextEncoding_APPLE_GREEK() 888 { 889 check( "RTL_TEXTENCODING_APPLE_GREEK", RTL_TEXTENCODING_APPLE_GREEK ); 890 } 891 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_GUJARATI()892 void UnixCharsetFromTextEncoding_APPLE_GUJARATI() 893 { 894 check( "RTL_TEXTENCODING_APPLE_GUJARATI", RTL_TEXTENCODING_APPLE_GUJARATI ); 895 } 896 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_GURMUKHI()897 void UnixCharsetFromTextEncoding_APPLE_GURMUKHI() 898 { 899 check( "RTL_TEXTENCODING_APPLE_GURMUKHI", RTL_TEXTENCODING_APPLE_GURMUKHI ); 900 } 901 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_HEBREW()902 void UnixCharsetFromTextEncoding_APPLE_HEBREW() 903 { 904 check( "RTL_TEXTENCODING_APPLE_HEBREW", RTL_TEXTENCODING_APPLE_HEBREW ); 905 } 906 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_ICELAND()907 void UnixCharsetFromTextEncoding_APPLE_ICELAND() 908 { 909 check( "RTL_TEXTENCODING_APPLE_ICELAND", RTL_TEXTENCODING_APPLE_ICELAND ); 910 } 911 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_ROMANIAN()912 void UnixCharsetFromTextEncoding_APPLE_ROMANIAN() 913 { 914 check( "RTL_TEXTENCODING_APPLE_ROMANIAN", RTL_TEXTENCODING_APPLE_ROMANIAN ); 915 } 916 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_THAI()917 void UnixCharsetFromTextEncoding_APPLE_THAI() 918 { 919 check( "RTL_TEXTENCODING_APPLE_THAI", RTL_TEXTENCODING_APPLE_THAI ); 920 } 921 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_TURKISH()922 void UnixCharsetFromTextEncoding_APPLE_TURKISH() 923 { 924 check( "RTL_TEXTENCODING_APPLE_TURKISH", RTL_TEXTENCODING_APPLE_TURKISH ); 925 } 926 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_UKRAINIAN()927 void UnixCharsetFromTextEncoding_APPLE_UKRAINIAN() 928 { 929 check( "RTL_TEXTENCODING_APPLE_UKRAINIAN", RTL_TEXTENCODING_APPLE_UKRAINIAN ); 930 } 931 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_CHINSIMP()932 void UnixCharsetFromTextEncoding_APPLE_CHINSIMP() 933 { 934 check( "RTL_TEXTENCODING_APPLE_CHINSIMP", RTL_TEXTENCODING_APPLE_CHINSIMP ); 935 } 936 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_CHINTRAD()937 void UnixCharsetFromTextEncoding_APPLE_CHINTRAD() 938 { 939 check( "RTL_TEXTENCODING_APPLE_CHINTRAD", RTL_TEXTENCODING_APPLE_CHINTRAD ); 940 } 941 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_JAPANESE()942 void UnixCharsetFromTextEncoding_APPLE_JAPANESE() 943 { 944 check( "RTL_TEXTENCODING_APPLE_JAPANESE", RTL_TEXTENCODING_APPLE_JAPANESE ); 945 } 946 // ---------------------------------------- UnixCharsetFromTextEncoding_APPLE_KOREAN()947 void UnixCharsetFromTextEncoding_APPLE_KOREAN() 948 { 949 check( "RTL_TEXTENCODING_APPLE_KOREAN", RTL_TEXTENCODING_APPLE_KOREAN ); 950 } 951 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_932()952 void UnixCharsetFromTextEncoding_MS_932() 953 { 954 check( "RTL_TEXTENCODING_MS_932", RTL_TEXTENCODING_MS_932 ); 955 } 956 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_936()957 void UnixCharsetFromTextEncoding_MS_936() 958 { 959 check( "RTL_TEXTENCODING_MS_936", RTL_TEXTENCODING_MS_936 ); 960 } 961 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_949()962 void UnixCharsetFromTextEncoding_MS_949() 963 { 964 check( "RTL_TEXTENCODING_MS_949", RTL_TEXTENCODING_MS_949 ); 965 } 966 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_950()967 void UnixCharsetFromTextEncoding_MS_950() 968 { 969 check( "RTL_TEXTENCODING_MS_950", RTL_TEXTENCODING_MS_950 ); 970 } 971 // ---------------------------------------- UnixCharsetFromTextEncoding_SHIFT_JIS()972 void UnixCharsetFromTextEncoding_SHIFT_JIS() 973 { 974 check( "RTL_TEXTENCODING_SHIFT_JIS", RTL_TEXTENCODING_SHIFT_JIS ); 975 } 976 // ---------------------------------------- UnixCharsetFromTextEncoding_GB_2312()977 void UnixCharsetFromTextEncoding_GB_2312() 978 { 979 check( "RTL_TEXTENCODING_GB_2312", RTL_TEXTENCODING_GB_2312 ); 980 } 981 // ---------------------------------------- UnixCharsetFromTextEncoding_GBT_12345()982 void UnixCharsetFromTextEncoding_GBT_12345() 983 { 984 check( "RTL_TEXTENCODING_GBT_12345", RTL_TEXTENCODING_GBT_12345 ); 985 } 986 // ---------------------------------------- UnixCharsetFromTextEncoding_GBK()987 void UnixCharsetFromTextEncoding_GBK() 988 { 989 check( "RTL_TEXTENCODING_GBK", RTL_TEXTENCODING_GBK ); 990 } 991 // ---------------------------------------- UnixCharsetFromTextEncoding_BIG5()992 void UnixCharsetFromTextEncoding_BIG5() 993 { 994 check( "RTL_TEXTENCODING_BIG5", RTL_TEXTENCODING_BIG5 ); 995 } 996 // ---------------------------------------- UnixCharsetFromTextEncoding_EUC_JP()997 void UnixCharsetFromTextEncoding_EUC_JP() 998 { 999 check( "RTL_TEXTENCODING_EUC_JP", RTL_TEXTENCODING_EUC_JP ); 1000 } 1001 // ---------------------------------------- UnixCharsetFromTextEncoding_EUC_CN()1002 void UnixCharsetFromTextEncoding_EUC_CN() 1003 { 1004 check( "RTL_TEXTENCODING_EUC_CN", RTL_TEXTENCODING_EUC_CN ); 1005 } 1006 // ---------------------------------------- UnixCharsetFromTextEncoding_EUC_TW()1007 void UnixCharsetFromTextEncoding_EUC_TW() 1008 { 1009 check( "RTL_TEXTENCODING_EUC_TW", RTL_TEXTENCODING_EUC_TW ); 1010 } 1011 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_2022_JP()1012 void UnixCharsetFromTextEncoding_ISO_2022_JP() 1013 { 1014 check( "RTL_TEXTENCODING_ISO_2022_JP", RTL_TEXTENCODING_ISO_2022_JP ); 1015 } 1016 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_2022_CN()1017 void UnixCharsetFromTextEncoding_ISO_2022_CN() 1018 { 1019 check( "RTL_TEXTENCODING_ISO_2022_CN", RTL_TEXTENCODING_ISO_2022_CN ); 1020 } 1021 // ---------------------------------------- UnixCharsetFromTextEncoding_KOI8_R()1022 void UnixCharsetFromTextEncoding_KOI8_R() 1023 { 1024 check( "RTL_TEXTENCODING_KOI8_R", RTL_TEXTENCODING_KOI8_R ); 1025 } 1026 // ---------------------------------------- UnixCharsetFromTextEncoding_UTF7()1027 void UnixCharsetFromTextEncoding_UTF7() 1028 { 1029 check( "RTL_TEXTENCODING_UTF7", RTL_TEXTENCODING_UTF7 ); 1030 } 1031 // ---------------------------------------- UnixCharsetFromTextEncoding_UTF8()1032 void UnixCharsetFromTextEncoding_UTF8() 1033 { 1034 check( "RTL_TEXTENCODING_UTF8", RTL_TEXTENCODING_UTF8 ); 1035 } 1036 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_10()1037 void UnixCharsetFromTextEncoding_ISO_8859_10() 1038 { 1039 check( "RTL_TEXTENCODING_ISO_8859_10", RTL_TEXTENCODING_ISO_8859_10 ); 1040 } 1041 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_8859_13()1042 void UnixCharsetFromTextEncoding_ISO_8859_13() 1043 { 1044 check( "RTL_TEXTENCODING_ISO_8859_13", RTL_TEXTENCODING_ISO_8859_13 ); 1045 } 1046 // ---------------------------------------- UnixCharsetFromTextEncoding_EUC_KR()1047 void UnixCharsetFromTextEncoding_EUC_KR() 1048 { 1049 check( "RTL_TEXTENCODING_EUC_KR", RTL_TEXTENCODING_EUC_KR ); 1050 } 1051 // ---------------------------------------- UnixCharsetFromTextEncoding_ISO_2022_KR()1052 void UnixCharsetFromTextEncoding_ISO_2022_KR() 1053 { 1054 check( "RTL_TEXTENCODING_ISO_2022_KR", RTL_TEXTENCODING_ISO_2022_KR ); 1055 } 1056 // ---------------------------------------- UnixCharsetFromTextEncoding_JIS_X_0201()1057 void UnixCharsetFromTextEncoding_JIS_X_0201() 1058 { 1059 check( "RTL_TEXTENCODING_JIS_X_0201", RTL_TEXTENCODING_JIS_X_0201 ); 1060 } 1061 // ---------------------------------------- UnixCharsetFromTextEncoding_JIS_X_0208()1062 void UnixCharsetFromTextEncoding_JIS_X_0208() 1063 { 1064 check( "RTL_TEXTENCODING_JIS_X_0208", RTL_TEXTENCODING_JIS_X_0208 ); 1065 } 1066 // ---------------------------------------- UnixCharsetFromTextEncoding_JIS_X_0212()1067 void UnixCharsetFromTextEncoding_JIS_X_0212() 1068 { 1069 check( "RTL_TEXTENCODING_JIS_X_0212", RTL_TEXTENCODING_JIS_X_0212 ); 1070 } 1071 // ---------------------------------------- UnixCharsetFromTextEncoding_MS_1361()1072 void UnixCharsetFromTextEncoding_MS_1361() 1073 { 1074 check( "RTL_TEXTENCODING_MS_1361", RTL_TEXTENCODING_MS_1361 ); 1075 } 1076 // ---------------------------------------- UnixCharsetFromTextEncoding_GB_18030()1077 void UnixCharsetFromTextEncoding_GB_18030() 1078 { 1079 check( "RTL_TEXTENCODING_GB_18030", RTL_TEXTENCODING_GB_18030 ); 1080 } 1081 // ---------------------------------------- UnixCharsetFromTextEncoding_BIG5_HKSCS()1082 void UnixCharsetFromTextEncoding_BIG5_HKSCS() 1083 { 1084 check( "RTL_TEXTENCODING_BIG5_HKSCS", RTL_TEXTENCODING_BIG5_HKSCS ); 1085 } 1086 // ---------------------------------------- UnixCharsetFromTextEncoding_TIS_620()1087 void UnixCharsetFromTextEncoding_TIS_620() 1088 { 1089 check( "RTL_TEXTENCODING_TIS_620", RTL_TEXTENCODING_TIS_620 ); 1090 } 1091 // ---------------------------------------- UnixCharsetFromTextEncoding_KOI8_U()1092 void UnixCharsetFromTextEncoding_KOI8_U() 1093 { 1094 check( "RTL_TEXTENCODING_KOI8_U", RTL_TEXTENCODING_KOI8_U ); 1095 } 1096 // ---------------------------------------- UnixCharsetFromTextEncoding_ISCII_DEVANAGARI()1097 void UnixCharsetFromTextEncoding_ISCII_DEVANAGARI() 1098 { 1099 check( "RTL_TEXTENCODING_ISCII_DEVANAGARI", RTL_TEXTENCODING_ISCII_DEVANAGARI ); 1100 } 1101 // ---------------------------------------- UnixCharsetFromTextEncoding_JAVA_UTF8()1102 void UnixCharsetFromTextEncoding_JAVA_UTF8() 1103 { 1104 check( "RTL_TEXTENCODING_JAVA_UTF8", RTL_TEXTENCODING_JAVA_UTF8 ); 1105 } 1106 // ---------------------------------------- 1107 1108 CPPUNIT_TEST_SUITE( getBestUnix ); 1109 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1252 ); 1110 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_ROMAN ); 1111 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_437 ); 1112 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_850 ); 1113 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_860 ); 1114 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_861 ); 1115 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_863 ); 1116 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_865 ); 1117 1118 CPPUNIT_TEST( UnixCharsetFromTextEncoding_SYMBOL ); 1119 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ASCII_US ); 1120 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_1 ); 1121 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_2 ); 1122 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_3 ); 1123 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_4 ); 1124 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_5 ); 1125 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_6 ); 1126 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_7 ); 1127 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_8 ); 1128 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_9 ); 1129 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_14 ); 1130 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_15 ); 1131 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_737 ); 1132 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_775 ); 1133 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_852 ); 1134 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_855 ); 1135 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_857 ); 1136 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_862 ); 1137 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_864 ); 1138 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_866 ); 1139 CPPUNIT_TEST( UnixCharsetFromTextEncoding_IBM_869 ); 1140 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_874 ); 1141 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1250 ); 1142 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1251 ); 1143 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1253 ); 1144 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1254 ); 1145 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1255 ); 1146 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1256 ); 1147 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1257 ); 1148 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1258 ); 1149 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_ARABIC ); 1150 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_CENTEURO ); 1151 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_CROATIAN ); 1152 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_CYRILLIC ); 1153 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_DEVANAGARI ); 1154 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_FARSI ); 1155 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_GREEK ); 1156 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_GUJARATI ); 1157 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_GURMUKHI ); 1158 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_HEBREW ); 1159 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_ICELAND ); 1160 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_ROMANIAN ); 1161 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_THAI ); 1162 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_TURKISH ); 1163 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_UKRAINIAN ); 1164 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_CHINSIMP ); 1165 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_CHINTRAD ); 1166 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_JAPANESE ); 1167 CPPUNIT_TEST( UnixCharsetFromTextEncoding_APPLE_KOREAN ); 1168 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_932 ); 1169 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_936 ); 1170 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_949 ); 1171 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_950 ); 1172 CPPUNIT_TEST( UnixCharsetFromTextEncoding_SHIFT_JIS ); 1173 CPPUNIT_TEST( UnixCharsetFromTextEncoding_GB_2312 ); 1174 CPPUNIT_TEST( UnixCharsetFromTextEncoding_GBT_12345 ); 1175 CPPUNIT_TEST( UnixCharsetFromTextEncoding_GBK ); 1176 CPPUNIT_TEST( UnixCharsetFromTextEncoding_BIG5 ); 1177 CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_JP ); 1178 CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_CN ); 1179 CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_TW ); 1180 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_2022_JP ); 1181 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_2022_CN ); 1182 CPPUNIT_TEST( UnixCharsetFromTextEncoding_KOI8_R ); 1183 CPPUNIT_TEST( UnixCharsetFromTextEncoding_UTF7 ); 1184 CPPUNIT_TEST( UnixCharsetFromTextEncoding_UTF8 ); 1185 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_10 ); 1186 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_8859_13 ); 1187 CPPUNIT_TEST( UnixCharsetFromTextEncoding_EUC_KR ); 1188 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISO_2022_KR ); 1189 CPPUNIT_TEST( UnixCharsetFromTextEncoding_JIS_X_0201 ); 1190 CPPUNIT_TEST( UnixCharsetFromTextEncoding_JIS_X_0208 ); 1191 CPPUNIT_TEST( UnixCharsetFromTextEncoding_JIS_X_0212 ); 1192 CPPUNIT_TEST( UnixCharsetFromTextEncoding_MS_1361 ); 1193 CPPUNIT_TEST( UnixCharsetFromTextEncoding_GB_18030 ); 1194 CPPUNIT_TEST( UnixCharsetFromTextEncoding_BIG5_HKSCS ); 1195 CPPUNIT_TEST( UnixCharsetFromTextEncoding_TIS_620 ); 1196 CPPUNIT_TEST( UnixCharsetFromTextEncoding_KOI8_U ); 1197 CPPUNIT_TEST( UnixCharsetFromTextEncoding_ISCII_DEVANAGARI ); 1198 CPPUNIT_TEST( UnixCharsetFromTextEncoding_JAVA_UTF8 ); 1199 1200 CPPUNIT_TEST_SUITE_END( ); 1201 }; 1202 1203 // ----------------------------------------------------------------------------- 1204 1205 1206 class getBestWindows : public CppUnit::TestFixture 1207 { 1208 public: setUp()1209 void setUp() 1210 { 1211 } 1212 check(const sal_Char * _pRTL_TEXTENCODING,rtl_TextEncoding _aCurrentEncode)1213 void check( const sal_Char* _pRTL_TEXTENCODING, rtl_TextEncoding _aCurrentEncode ) 1214 { 1215 const sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( _aCurrentEncode ); 1216 if (nCharSet == 1) 1217 { 1218 t_print("rtl_getBestWindowsCharsetFromTextEncoding(%s) (%d) doesn't seem to exist.\n\n", _pRTL_TEXTENCODING, _aCurrentEncode); 1219 } 1220 else 1221 { 1222 t_print(T_VERBOSE, "'%s' is charset: '%d'\n", _pRTL_TEXTENCODING, nCharSet); 1223 1224 rtl_TextEncoding eTextEnc = rtl_getTextEncodingFromWindowsCharset( nCharSet ); 1225 if (_aCurrentEncode != eTextEnc && 1226 eTextEnc != RTL_TEXTENCODING_DONTKNOW) 1227 { 1228 t_print("rtl_getBestUnixCharsetFromTextEncoding(%s) is charset: %d\n", _pRTL_TEXTENCODING, nCharSet); 1229 t_print("rtl_getTextEncodingFromWindowsCharset() differ: %s %d -> %d\n\n", _pRTL_TEXTENCODING, _aCurrentEncode, eTextEnc ); 1230 } 1231 // rtl::OString sError = "getTextEncodingFromWindowsCharset("; 1232 // sError += rtl::OString::valueOf(nCharSet); 1233 // sError += ") returns nul."; 1234 1235 // CPPUNIT_ASSERT_MESSAGE(sError.getStr(), eTextEnc != RTL_TEXTENCODING_DONTKNOW); 1236 // CPPUNIT_ASSERT_MESSAGE("Does not realize itself", _aCurrentEncode == eTextEnc ); 1237 } 1238 } 1239 1240 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1252()1241 void WindowsCharsetFromTextEncoding_MS_1252() 1242 { 1243 check( "RTL_TEXTENCODING_MS_1252", RTL_TEXTENCODING_MS_1252 ); 1244 } 1245 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_ROMAN()1246 void WindowsCharsetFromTextEncoding_APPLE_ROMAN() 1247 { 1248 check( "RTL_TEXTENCODING_APPLE_ROMAN", RTL_TEXTENCODING_APPLE_ROMAN ); 1249 } 1250 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_437()1251 void WindowsCharsetFromTextEncoding_IBM_437() 1252 { 1253 check( "RTL_TEXTENCODING_IBM_437", RTL_TEXTENCODING_IBM_437 ); 1254 } 1255 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_850()1256 void WindowsCharsetFromTextEncoding_IBM_850() 1257 { 1258 check( "RTL_TEXTENCODING_IBM_850", RTL_TEXTENCODING_IBM_850 ); 1259 } 1260 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_860()1261 void WindowsCharsetFromTextEncoding_IBM_860() 1262 { 1263 check( "RTL_TEXTENCODING_IBM_860", RTL_TEXTENCODING_IBM_860 ); 1264 } 1265 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_861()1266 void WindowsCharsetFromTextEncoding_IBM_861() 1267 { 1268 check( "RTL_TEXTENCODING_IBM_861", RTL_TEXTENCODING_IBM_861 ); 1269 } 1270 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_863()1271 void WindowsCharsetFromTextEncoding_IBM_863() 1272 { 1273 check( "RTL_TEXTENCODING_IBM_863", RTL_TEXTENCODING_IBM_863 ); 1274 } 1275 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_865()1276 void WindowsCharsetFromTextEncoding_IBM_865() 1277 { 1278 check( "RTL_TEXTENCODING_IBM_865", RTL_TEXTENCODING_IBM_865 ); 1279 } 1280 // ---------------------------------------- WindowsCharsetFromTextEncoding_SYMBOL()1281 void WindowsCharsetFromTextEncoding_SYMBOL() 1282 { 1283 check( "RTL_TEXTENCODING_SYMBOL", RTL_TEXTENCODING_SYMBOL ); 1284 } 1285 // ---------------------------------------- WindowsCharsetFromTextEncoding_ASCII_US()1286 void WindowsCharsetFromTextEncoding_ASCII_US() 1287 { 1288 check( "RTL_TEXTENCODING_ASCII_US", RTL_TEXTENCODING_ASCII_US ); 1289 } 1290 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_1()1291 void WindowsCharsetFromTextEncoding_ISO_8859_1() 1292 { 1293 check( "RTL_TEXTENCODING_ISO_8859_1", RTL_TEXTENCODING_ISO_8859_1 ); 1294 } 1295 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_2()1296 void WindowsCharsetFromTextEncoding_ISO_8859_2() 1297 { 1298 check( "RTL_TEXTENCODING_ISO_8859_2", RTL_TEXTENCODING_ISO_8859_2 ); 1299 } 1300 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_3()1301 void WindowsCharsetFromTextEncoding_ISO_8859_3() 1302 { 1303 check( "RTL_TEXTENCODING_ISO_8859_3", RTL_TEXTENCODING_ISO_8859_3 ); 1304 } 1305 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_4()1306 void WindowsCharsetFromTextEncoding_ISO_8859_4() 1307 { 1308 check( "RTL_TEXTENCODING_ISO_8859_4", RTL_TEXTENCODING_ISO_8859_4 ); 1309 } 1310 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_5()1311 void WindowsCharsetFromTextEncoding_ISO_8859_5() 1312 { 1313 check( "RTL_TEXTENCODING_ISO_8859_5", RTL_TEXTENCODING_ISO_8859_5 ); 1314 } 1315 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_6()1316 void WindowsCharsetFromTextEncoding_ISO_8859_6() 1317 { 1318 check( "RTL_TEXTENCODING_ISO_8859_6", RTL_TEXTENCODING_ISO_8859_6 ); 1319 } 1320 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_7()1321 void WindowsCharsetFromTextEncoding_ISO_8859_7() 1322 { 1323 check( "RTL_TEXTENCODING_ISO_8859_7", RTL_TEXTENCODING_ISO_8859_7 ); 1324 } 1325 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_8()1326 void WindowsCharsetFromTextEncoding_ISO_8859_8() 1327 { 1328 check( "RTL_TEXTENCODING_ISO_8859_8", RTL_TEXTENCODING_ISO_8859_8 ); 1329 } 1330 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_9()1331 void WindowsCharsetFromTextEncoding_ISO_8859_9() 1332 { 1333 check( "RTL_TEXTENCODING_ISO_8859_9", RTL_TEXTENCODING_ISO_8859_9 ); 1334 } 1335 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_14()1336 void WindowsCharsetFromTextEncoding_ISO_8859_14() 1337 { 1338 check( "RTL_TEXTENCODING_ISO_8859_14", RTL_TEXTENCODING_ISO_8859_14 ); 1339 } 1340 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_15()1341 void WindowsCharsetFromTextEncoding_ISO_8859_15() 1342 { 1343 check( "RTL_TEXTENCODING_ISO_8859_15", RTL_TEXTENCODING_ISO_8859_15 ); 1344 } 1345 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_737()1346 void WindowsCharsetFromTextEncoding_IBM_737() 1347 { 1348 check( "RTL_TEXTENCODING_IBM_737", RTL_TEXTENCODING_IBM_737 ); 1349 } 1350 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_775()1351 void WindowsCharsetFromTextEncoding_IBM_775() 1352 { 1353 check( "RTL_TEXTENCODING_IBM_775", RTL_TEXTENCODING_IBM_775 ); 1354 } 1355 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_852()1356 void WindowsCharsetFromTextEncoding_IBM_852() 1357 { 1358 check( "RTL_TEXTENCODING_IBM_852", RTL_TEXTENCODING_IBM_852 ); 1359 } 1360 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_855()1361 void WindowsCharsetFromTextEncoding_IBM_855() 1362 { 1363 check( "RTL_TEXTENCODING_IBM_855", RTL_TEXTENCODING_IBM_855 ); 1364 } 1365 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_857()1366 void WindowsCharsetFromTextEncoding_IBM_857() 1367 { 1368 check( "RTL_TEXTENCODING_IBM_857", RTL_TEXTENCODING_IBM_857 ); 1369 } 1370 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_862()1371 void WindowsCharsetFromTextEncoding_IBM_862() 1372 { 1373 check( "RTL_TEXTENCODING_IBM_862", RTL_TEXTENCODING_IBM_862 ); 1374 } 1375 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_864()1376 void WindowsCharsetFromTextEncoding_IBM_864() 1377 { 1378 check( "RTL_TEXTENCODING_IBM_864", RTL_TEXTENCODING_IBM_864 ); 1379 } 1380 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_866()1381 void WindowsCharsetFromTextEncoding_IBM_866() 1382 { 1383 check( "RTL_TEXTENCODING_IBM_866", RTL_TEXTENCODING_IBM_866 ); 1384 } 1385 // ---------------------------------------- WindowsCharsetFromTextEncoding_IBM_869()1386 void WindowsCharsetFromTextEncoding_IBM_869() 1387 { 1388 check( "RTL_TEXTENCODING_IBM_869", RTL_TEXTENCODING_IBM_869 ); 1389 } 1390 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_874()1391 void WindowsCharsetFromTextEncoding_MS_874() 1392 { 1393 check( "RTL_TEXTENCODING_MS_874", RTL_TEXTENCODING_MS_874 ); 1394 } 1395 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1250()1396 void WindowsCharsetFromTextEncoding_MS_1250() 1397 { 1398 check( "RTL_TEXTENCODING_MS_1250", RTL_TEXTENCODING_MS_1250 ); 1399 } 1400 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1251()1401 void WindowsCharsetFromTextEncoding_MS_1251() 1402 { 1403 check( "RTL_TEXTENCODING_MS_1251", RTL_TEXTENCODING_MS_1251 ); 1404 } 1405 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1253()1406 void WindowsCharsetFromTextEncoding_MS_1253() 1407 { 1408 check( "RTL_TEXTENCODING_MS_1253", RTL_TEXTENCODING_MS_1253 ); 1409 } 1410 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1254()1411 void WindowsCharsetFromTextEncoding_MS_1254() 1412 { 1413 check( "RTL_TEXTENCODING_MS_1254", RTL_TEXTENCODING_MS_1254 ); 1414 } 1415 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1255()1416 void WindowsCharsetFromTextEncoding_MS_1255() 1417 { 1418 check( "RTL_TEXTENCODING_MS_1255", RTL_TEXTENCODING_MS_1255 ); 1419 } 1420 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1256()1421 void WindowsCharsetFromTextEncoding_MS_1256() 1422 { 1423 check( "RTL_TEXTENCODING_MS_1256", RTL_TEXTENCODING_MS_1256 ); 1424 } 1425 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1257()1426 void WindowsCharsetFromTextEncoding_MS_1257() 1427 { 1428 check( "RTL_TEXTENCODING_MS_1257", RTL_TEXTENCODING_MS_1257 ); 1429 } 1430 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1258()1431 void WindowsCharsetFromTextEncoding_MS_1258() 1432 { 1433 check( "RTL_TEXTENCODING_MS_1258", RTL_TEXTENCODING_MS_1258 ); 1434 } 1435 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_ARABIC()1436 void WindowsCharsetFromTextEncoding_APPLE_ARABIC() 1437 { 1438 check( "RTL_TEXTENCODING_APPLE_ARABIC", RTL_TEXTENCODING_APPLE_ARABIC ); 1439 } 1440 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_CENTEURO()1441 void WindowsCharsetFromTextEncoding_APPLE_CENTEURO() 1442 { 1443 check( "RTL_TEXTENCODING_APPLE_CENTEURO", RTL_TEXTENCODING_APPLE_CENTEURO ); 1444 } 1445 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_CROATIAN()1446 void WindowsCharsetFromTextEncoding_APPLE_CROATIAN() 1447 { 1448 check( "RTL_TEXTENCODING_APPLE_CROATIAN", RTL_TEXTENCODING_APPLE_CROATIAN ); 1449 } 1450 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_CYRILLIC()1451 void WindowsCharsetFromTextEncoding_APPLE_CYRILLIC() 1452 { 1453 check( "RTL_TEXTENCODING_APPLE_CYRILLIC", RTL_TEXTENCODING_APPLE_CYRILLIC ); 1454 } 1455 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_DEVANAGARI()1456 void WindowsCharsetFromTextEncoding_APPLE_DEVANAGARI() 1457 { 1458 check( "RTL_TEXTENCODING_APPLE_DEVANAGARI", RTL_TEXTENCODING_APPLE_DEVANAGARI ); 1459 } 1460 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_FARSI()1461 void WindowsCharsetFromTextEncoding_APPLE_FARSI() 1462 { 1463 check( "RTL_TEXTENCODING_APPLE_FARSI", RTL_TEXTENCODING_APPLE_FARSI ); 1464 } 1465 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_GREEK()1466 void WindowsCharsetFromTextEncoding_APPLE_GREEK() 1467 { 1468 check( "RTL_TEXTENCODING_APPLE_GREEK", RTL_TEXTENCODING_APPLE_GREEK ); 1469 } 1470 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_GUJARATI()1471 void WindowsCharsetFromTextEncoding_APPLE_GUJARATI() 1472 { 1473 check( "RTL_TEXTENCODING_APPLE_GUJARATI", RTL_TEXTENCODING_APPLE_GUJARATI ); 1474 } 1475 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_GURMUKHI()1476 void WindowsCharsetFromTextEncoding_APPLE_GURMUKHI() 1477 { 1478 check( "RTL_TEXTENCODING_APPLE_GURMUKHI", RTL_TEXTENCODING_APPLE_GURMUKHI ); 1479 } 1480 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_HEBREW()1481 void WindowsCharsetFromTextEncoding_APPLE_HEBREW() 1482 { 1483 check( "RTL_TEXTENCODING_APPLE_HEBREW", RTL_TEXTENCODING_APPLE_HEBREW ); 1484 } 1485 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_ICELAND()1486 void WindowsCharsetFromTextEncoding_APPLE_ICELAND() 1487 { 1488 check( "RTL_TEXTENCODING_APPLE_ICELAND", RTL_TEXTENCODING_APPLE_ICELAND ); 1489 } 1490 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_ROMANIAN()1491 void WindowsCharsetFromTextEncoding_APPLE_ROMANIAN() 1492 { 1493 check( "RTL_TEXTENCODING_APPLE_ROMANIAN", RTL_TEXTENCODING_APPLE_ROMANIAN ); 1494 } 1495 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_THAI()1496 void WindowsCharsetFromTextEncoding_APPLE_THAI() 1497 { 1498 check( "RTL_TEXTENCODING_APPLE_THAI", RTL_TEXTENCODING_APPLE_THAI ); 1499 } 1500 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_TURKISH()1501 void WindowsCharsetFromTextEncoding_APPLE_TURKISH() 1502 { 1503 check( "RTL_TEXTENCODING_APPLE_TURKISH", RTL_TEXTENCODING_APPLE_TURKISH ); 1504 } 1505 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_UKRAINIAN()1506 void WindowsCharsetFromTextEncoding_APPLE_UKRAINIAN() 1507 { 1508 check( "RTL_TEXTENCODING_APPLE_UKRAINIAN", RTL_TEXTENCODING_APPLE_UKRAINIAN ); 1509 } 1510 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_CHINSIMP()1511 void WindowsCharsetFromTextEncoding_APPLE_CHINSIMP() 1512 { 1513 check( "RTL_TEXTENCODING_APPLE_CHINSIMP", RTL_TEXTENCODING_APPLE_CHINSIMP ); 1514 } 1515 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_CHINTRAD()1516 void WindowsCharsetFromTextEncoding_APPLE_CHINTRAD() 1517 { 1518 check( "RTL_TEXTENCODING_APPLE_CHINTRAD", RTL_TEXTENCODING_APPLE_CHINTRAD ); 1519 } 1520 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_JAPANESE()1521 void WindowsCharsetFromTextEncoding_APPLE_JAPANESE() 1522 { 1523 check( "RTL_TEXTENCODING_APPLE_JAPANESE", RTL_TEXTENCODING_APPLE_JAPANESE ); 1524 } 1525 // ---------------------------------------- WindowsCharsetFromTextEncoding_APPLE_KOREAN()1526 void WindowsCharsetFromTextEncoding_APPLE_KOREAN() 1527 { 1528 check( "RTL_TEXTENCODING_APPLE_KOREAN", RTL_TEXTENCODING_APPLE_KOREAN ); 1529 } 1530 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_932()1531 void WindowsCharsetFromTextEncoding_MS_932() 1532 { 1533 check( "RTL_TEXTENCODING_MS_932", RTL_TEXTENCODING_MS_932 ); 1534 } 1535 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_936()1536 void WindowsCharsetFromTextEncoding_MS_936() 1537 { 1538 check( "RTL_TEXTENCODING_MS_936", RTL_TEXTENCODING_MS_936 ); 1539 } 1540 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_949()1541 void WindowsCharsetFromTextEncoding_MS_949() 1542 { 1543 check( "RTL_TEXTENCODING_MS_949", RTL_TEXTENCODING_MS_949 ); 1544 } 1545 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_950()1546 void WindowsCharsetFromTextEncoding_MS_950() 1547 { 1548 check( "RTL_TEXTENCODING_MS_950", RTL_TEXTENCODING_MS_950 ); 1549 } 1550 // ---------------------------------------- WindowsCharsetFromTextEncoding_SHIFT_JIS()1551 void WindowsCharsetFromTextEncoding_SHIFT_JIS() 1552 { 1553 check( "RTL_TEXTENCODING_SHIFT_JIS", RTL_TEXTENCODING_SHIFT_JIS ); 1554 } 1555 // ---------------------------------------- WindowsCharsetFromTextEncoding_GB_2312()1556 void WindowsCharsetFromTextEncoding_GB_2312() 1557 { 1558 check( "RTL_TEXTENCODING_GB_2312", RTL_TEXTENCODING_GB_2312 ); 1559 } 1560 // ---------------------------------------- WindowsCharsetFromTextEncoding_GBT_12345()1561 void WindowsCharsetFromTextEncoding_GBT_12345() 1562 { 1563 check( "RTL_TEXTENCODING_GBT_12345", RTL_TEXTENCODING_GBT_12345 ); 1564 } 1565 // ---------------------------------------- WindowsCharsetFromTextEncoding_GBK()1566 void WindowsCharsetFromTextEncoding_GBK() 1567 { 1568 check( "RTL_TEXTENCODING_GBK", RTL_TEXTENCODING_GBK ); 1569 } 1570 // ---------------------------------------- WindowsCharsetFromTextEncoding_BIG5()1571 void WindowsCharsetFromTextEncoding_BIG5() 1572 { 1573 check( "RTL_TEXTENCODING_BIG5", RTL_TEXTENCODING_BIG5 ); 1574 } 1575 // ---------------------------------------- WindowsCharsetFromTextEncoding_EUC_JP()1576 void WindowsCharsetFromTextEncoding_EUC_JP() 1577 { 1578 check( "RTL_TEXTENCODING_EUC_JP", RTL_TEXTENCODING_EUC_JP ); 1579 } 1580 // ---------------------------------------- WindowsCharsetFromTextEncoding_EUC_CN()1581 void WindowsCharsetFromTextEncoding_EUC_CN() 1582 { 1583 check( "RTL_TEXTENCODING_EUC_CN", RTL_TEXTENCODING_EUC_CN ); 1584 } 1585 // ---------------------------------------- WindowsCharsetFromTextEncoding_EUC_TW()1586 void WindowsCharsetFromTextEncoding_EUC_TW() 1587 { 1588 check( "RTL_TEXTENCODING_EUC_TW", RTL_TEXTENCODING_EUC_TW ); 1589 } 1590 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_2022_JP()1591 void WindowsCharsetFromTextEncoding_ISO_2022_JP() 1592 { 1593 check( "RTL_TEXTENCODING_ISO_2022_JP", RTL_TEXTENCODING_ISO_2022_JP ); 1594 } 1595 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_2022_CN()1596 void WindowsCharsetFromTextEncoding_ISO_2022_CN() 1597 { 1598 check( "RTL_TEXTENCODING_ISO_2022_CN", RTL_TEXTENCODING_ISO_2022_CN ); 1599 } 1600 // ---------------------------------------- WindowsCharsetFromTextEncoding_KOI8_R()1601 void WindowsCharsetFromTextEncoding_KOI8_R() 1602 { 1603 check( "RTL_TEXTENCODING_KOI8_R", RTL_TEXTENCODING_KOI8_R ); 1604 } 1605 // ---------------------------------------- WindowsCharsetFromTextEncoding_UTF7()1606 void WindowsCharsetFromTextEncoding_UTF7() 1607 { 1608 check( "RTL_TEXTENCODING_UTF7", RTL_TEXTENCODING_UTF7 ); 1609 } 1610 // ---------------------------------------- WindowsCharsetFromTextEncoding_UTF8()1611 void WindowsCharsetFromTextEncoding_UTF8() 1612 { 1613 check( "RTL_TEXTENCODING_UTF8", RTL_TEXTENCODING_UTF8 ); 1614 } 1615 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_10()1616 void WindowsCharsetFromTextEncoding_ISO_8859_10() 1617 { 1618 check( "RTL_TEXTENCODING_ISO_8859_10", RTL_TEXTENCODING_ISO_8859_10 ); 1619 } 1620 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_8859_13()1621 void WindowsCharsetFromTextEncoding_ISO_8859_13() 1622 { 1623 check( "RTL_TEXTENCODING_ISO_8859_13", RTL_TEXTENCODING_ISO_8859_13 ); 1624 } 1625 // ---------------------------------------- WindowsCharsetFromTextEncoding_EUC_KR()1626 void WindowsCharsetFromTextEncoding_EUC_KR() 1627 { 1628 check( "RTL_TEXTENCODING_EUC_KR", RTL_TEXTENCODING_EUC_KR ); 1629 } 1630 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISO_2022_KR()1631 void WindowsCharsetFromTextEncoding_ISO_2022_KR() 1632 { 1633 check( "RTL_TEXTENCODING_ISO_2022_KR", RTL_TEXTENCODING_ISO_2022_KR ); 1634 } 1635 // ---------------------------------------- WindowsCharsetFromTextEncoding_JIS_X_0201()1636 void WindowsCharsetFromTextEncoding_JIS_X_0201() 1637 { 1638 check( "RTL_TEXTENCODING_JIS_X_0201", RTL_TEXTENCODING_JIS_X_0201 ); 1639 } 1640 // ---------------------------------------- WindowsCharsetFromTextEncoding_JIS_X_0208()1641 void WindowsCharsetFromTextEncoding_JIS_X_0208() 1642 { 1643 check( "RTL_TEXTENCODING_JIS_X_0208", RTL_TEXTENCODING_JIS_X_0208 ); 1644 } 1645 // ---------------------------------------- WindowsCharsetFromTextEncoding_JIS_X_0212()1646 void WindowsCharsetFromTextEncoding_JIS_X_0212() 1647 { 1648 check( "RTL_TEXTENCODING_JIS_X_0212", RTL_TEXTENCODING_JIS_X_0212 ); 1649 } 1650 // ---------------------------------------- WindowsCharsetFromTextEncoding_MS_1361()1651 void WindowsCharsetFromTextEncoding_MS_1361() 1652 { 1653 check( "RTL_TEXTENCODING_MS_1361", RTL_TEXTENCODING_MS_1361 ); 1654 } 1655 // ---------------------------------------- WindowsCharsetFromTextEncoding_GB_18030()1656 void WindowsCharsetFromTextEncoding_GB_18030() 1657 { 1658 check( "RTL_TEXTENCODING_GB_18030", RTL_TEXTENCODING_GB_18030 ); 1659 } 1660 // ---------------------------------------- WindowsCharsetFromTextEncoding_BIG5_HKSCS()1661 void WindowsCharsetFromTextEncoding_BIG5_HKSCS() 1662 { 1663 check( "RTL_TEXTENCODING_BIG5_HKSCS", RTL_TEXTENCODING_BIG5_HKSCS ); 1664 } 1665 // ---------------------------------------- WindowsCharsetFromTextEncoding_TIS_620()1666 void WindowsCharsetFromTextEncoding_TIS_620() 1667 { 1668 check( "RTL_TEXTENCODING_TIS_620", RTL_TEXTENCODING_TIS_620 ); 1669 } 1670 // ---------------------------------------- WindowsCharsetFromTextEncoding_KOI8_U()1671 void WindowsCharsetFromTextEncoding_KOI8_U() 1672 { 1673 check( "RTL_TEXTENCODING_KOI8_U", RTL_TEXTENCODING_KOI8_U ); 1674 } 1675 // ---------------------------------------- WindowsCharsetFromTextEncoding_ISCII_DEVANAGARI()1676 void WindowsCharsetFromTextEncoding_ISCII_DEVANAGARI() 1677 { 1678 check( "RTL_TEXTENCODING_ISCII_DEVANAGARI", RTL_TEXTENCODING_ISCII_DEVANAGARI ); 1679 } 1680 // ---------------------------------------- WindowsCharsetFromTextEncoding_JAVA_UTF8()1681 void WindowsCharsetFromTextEncoding_JAVA_UTF8() 1682 { 1683 check( "RTL_TEXTENCODING_JAVA_UTF8", RTL_TEXTENCODING_JAVA_UTF8 ); 1684 } 1685 // ---------------------------------------- 1686 1687 CPPUNIT_TEST_SUITE( getBestWindows ); 1688 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1252 ); 1689 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_ROMAN ); 1690 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_437 ); 1691 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_850 ); 1692 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_860 ); 1693 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_861 ); 1694 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_863 ); 1695 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_865 ); 1696 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_SYMBOL ); 1697 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ASCII_US ); 1698 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_1 ); 1699 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_2 ); 1700 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_3 ); 1701 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_4 ); 1702 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_5 ); 1703 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_6 ); 1704 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_7 ); 1705 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_8 ); 1706 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_9 ); 1707 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_14 ); 1708 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_15 ); 1709 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_737 ); 1710 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_775 ); 1711 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_852 ); 1712 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_855 ); 1713 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_857 ); 1714 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_862 ); 1715 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_864 ); 1716 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_866 ); 1717 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_IBM_869 ); 1718 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_874 ); 1719 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1250 ); 1720 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1251 ); 1721 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1253 ); 1722 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1254 ); 1723 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1255 ); 1724 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1256 ); 1725 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1257 ); 1726 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1258 ); 1727 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_ARABIC ); 1728 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_CENTEURO ); 1729 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_CROATIAN ); 1730 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_CYRILLIC ); 1731 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_DEVANAGARI ); 1732 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_FARSI ); 1733 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_GREEK ); 1734 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_GUJARATI ); 1735 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_GURMUKHI ); 1736 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_HEBREW ); 1737 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_ICELAND ); 1738 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_ROMANIAN ); 1739 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_THAI ); 1740 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_TURKISH ); 1741 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_UKRAINIAN ); 1742 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_CHINSIMP ); 1743 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_CHINTRAD ); 1744 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_JAPANESE ); 1745 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_APPLE_KOREAN ); 1746 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_932 ); 1747 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_936 ); 1748 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_949 ); 1749 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_950 ); 1750 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_SHIFT_JIS ); 1751 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_GB_2312 ); 1752 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_GBT_12345 ); 1753 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_GBK ); 1754 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_BIG5 ); 1755 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_EUC_JP ); 1756 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_EUC_CN ); 1757 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_EUC_TW ); 1758 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_2022_JP ); 1759 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_2022_CN ); 1760 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_KOI8_R ); 1761 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_UTF7 ); 1762 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_UTF8 ); 1763 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_10 ); 1764 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_8859_13 ); 1765 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_EUC_KR ); 1766 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISO_2022_KR ); 1767 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_JIS_X_0201 ); 1768 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_JIS_X_0208 ); 1769 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_JIS_X_0212 ); 1770 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_MS_1361 ); 1771 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_GB_18030 ); 1772 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_BIG5_HKSCS ); 1773 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_TIS_620 ); 1774 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_KOI8_U ); 1775 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_ISCII_DEVANAGARI ); 1776 CPPUNIT_TEST( WindowsCharsetFromTextEncoding_JAVA_UTF8 ); 1777 1778 CPPUNIT_TEST_SUITE_END( ); 1779 }; 1780 class getTextEncodingInfo: public CppUnit::TestFixture 1781 { 1782 public: 1783 // initialise your test code values here. setUp()1784 void setUp() 1785 { 1786 } 1787 tearDown()1788 void tearDown() 1789 { 1790 } 1791 1792 // not implemented encoding test getTextEncodingInfo_001()1793 void getTextEncodingInfo_001() 1794 { 1795 rtl_TextEncodingInfo aInfo1, aInfo2, aInfo3, aInfo4, aInfo5; 1796 aInfo1.StructSize = 4; 1797 // not implemented 1798 sal_Bool bRes1 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_ARABIC, &aInfo1 ); 1799 // implemented 1800 sal_Bool bRes11 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_CYRILLIC, &aInfo1 ); 1801 CPPUNIT_ASSERT_MESSAGE("should return sal_False.", bRes1 == sal_False && bRes11 == sal_False ); 1802 1803 aInfo2.StructSize = 5; 1804 sal_Bool bRes2 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_ARABIC, &aInfo2 ); 1805 sal_Bool bRes21 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_CYRILLIC, &aInfo2 ); 1806 CPPUNIT_ASSERT_MESSAGE("StructSize<6 should return sal_True", bRes2 == sal_True && bRes21 == sal_True && aInfo2.MinimumCharSize >=1 ); 1807 1808 aInfo3.StructSize = 6; 1809 sal_Bool bRes3 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_ARABIC, &aInfo3 ); 1810 sal_Bool bRes31 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_CYRILLIC, &aInfo3 ); 1811 CPPUNIT_ASSERT_MESSAGE("StructSize<6 should return sal_True", bRes3 == sal_True && bRes31 == sal_True ); 1812 //&& aInfo2.MinimumCharSize >=1 ); 1813 1814 aInfo4.StructSize = 8; 1815 sal_Bool bRes4 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_ARABIC, &aInfo4 ); 1816 sal_Bool bRes41 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_CYRILLIC, &aInfo4); 1817 CPPUNIT_ASSERT_MESSAGE("StructSize<6 should return sal_True", bRes4 == sal_True && bRes41 == sal_True); 1818 // && aInfo2.MinimumCharSize >=1 ); 1819 1820 aInfo5.StructSize = sizeof aInfo5; 1821 sal_Bool bRes5 = rtl_getTextEncodingInfo( RTL_TEXTENCODING_APPLE_ARABIC, &aInfo5 ); 1822 CPPUNIT_ASSERT_MESSAGE("StructSize<6 should return sal_True", bRes5 == sal_False && aInfo5.Flags == 0); 1823 1824 } 1825 CPPUNIT_TEST_SUITE(getTextEncodingInfo); 1826 CPPUNIT_TEST(getTextEncodingInfo_001); 1827 //CPPUNIT_TEST(getTextEncodingInfo_002); 1828 CPPUNIT_TEST_SUITE_END(); 1829 }; 1830 } 1831 1832 namespace { 1833 1834 class TestEncodingFromUnix: public CppUnit::TestFixture { 1835 public: testIso8859()1836 void testIso8859() { 1837 check(RTL_TEXTENCODING_DONTKNOW, "ISO8859"); 1838 check(RTL_TEXTENCODING_DONTKNOW, "ISO8859-0"); 1839 check(RTL_TEXTENCODING_DONTKNOW, "ISO8859-01"); 1840 check(RTL_TEXTENCODING_DONTKNOW, "ISO8859_1"); 1841 check(RTL_TEXTENCODING_DONTKNOW, "ISO88591"); 1842 check(RTL_TEXTENCODING_ISO_8859_1, "ISO8859-1"); 1843 check(RTL_TEXTENCODING_ISO_8859_2, "ISO8859-2"); 1844 check(RTL_TEXTENCODING_ISO_8859_3, "ISO8859-3"); 1845 check(RTL_TEXTENCODING_ISO_8859_4, "ISO8859-4"); 1846 check(RTL_TEXTENCODING_ISO_8859_5, "ISO8859-5"); 1847 check(RTL_TEXTENCODING_ISO_8859_6, "ISO8859-6"); 1848 check(RTL_TEXTENCODING_ISO_8859_7, "ISO8859-7"); 1849 check(RTL_TEXTENCODING_ISO_8859_8, "ISO8859-8"); 1850 check(RTL_TEXTENCODING_ISO_8859_9, "ISO8859-9"); 1851 check(RTL_TEXTENCODING_ISO_8859_10, "ISO8859-10"); 1852 check(RTL_TEXTENCODING_TIS_620, "ISO8859-11"); 1853 check(RTL_TEXTENCODING_ISO_8859_13, "ISO8859-13"); 1854 check(RTL_TEXTENCODING_ISO_8859_14, "ISO8859-14"); 1855 check(RTL_TEXTENCODING_ISO_8859_15, "ISO8859-15"); 1856 } 1857 testTis620()1858 void testTis620() { 1859 check(RTL_TEXTENCODING_DONTKNOW, "TIS620"); 1860 check(RTL_TEXTENCODING_TIS_620, "TIS620-0"); 1861 check(RTL_TEXTENCODING_DONTKNOW, "TIS620-1"); 1862 check(RTL_TEXTENCODING_TIS_620, "TIS620-2529"); 1863 check(RTL_TEXTENCODING_TIS_620, "TIS620-2533"); 1864 check(RTL_TEXTENCODING_DONTKNOW, "TIS620.2529-0"); 1865 check(RTL_TEXTENCODING_TIS_620, "TIS620.2529-1"); 1866 check(RTL_TEXTENCODING_DONTKNOW, "TIS620.2529-2"); 1867 check(RTL_TEXTENCODING_TIS_620, "TIS620.2533-0"); 1868 check(RTL_TEXTENCODING_TIS_620, "TIS620.2533-1"); 1869 check(RTL_TEXTENCODING_DONTKNOW, "TIS620.2533-2"); 1870 } 1871 1872 CPPUNIT_TEST_SUITE(TestEncodingFromUnix); 1873 CPPUNIT_TEST(testIso8859); 1874 CPPUNIT_TEST(testTis620); 1875 CPPUNIT_TEST_SUITE_END(); 1876 1877 private: check(rtl_TextEncoding expected,char const * input)1878 void check(rtl_TextEncoding expected, char const * input) { 1879 CPPUNIT_ASSERT_EQUAL_MESSAGE( 1880 input, expected, rtl_getTextEncodingFromUnixCharset(input)); 1881 } 1882 }; 1883 1884 } 1885 1886 // ----------------------------------------------------------------------------- 1887 1888 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( rtl_tencinfo::getBestMime, "rtl_tencinfo" ); 1889 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( rtl_tencinfo::getBestUnix, "rtl_tencinfo" ); 1890 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( rtl_tencinfo::getBestWindows, "rtl_tencinfo" ); 1891 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( rtl_tencinfo::getTextEncodingInfo, "rtl_tencinfo" ); 1892 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( 1893 TestEncodingFromUnix, "TestEncodingFromUnix"); 1894 1895 // ----------------------------------------------------------------------------- 1896 1897 NOADDITIONAL; 1898