Eliminate non-ascii chars from generated include file

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell 2005-07-04 12:25:56 +00:00
parent 76ad7b36c1
commit a7ea35b011
2 changed files with 25 additions and 25 deletions

View File

@ -1,7 +1,7 @@
/* /*
* Test data for wxRegEx (UTF-8 encoded) * Test data for wxRegEx (UTF-8 encoded)
* *
* Generated Sun Apr 25 15:30:23 2004 by regex.pl from the following files: * Generated Thu Jun 30 10:26:38 2005 by regex.pl from the following files:
* *
* reg.test: Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. * reg.test: Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
* wxreg.test: Copyright (c) 2004 Mike Wetherell. * wxreg.test: Copyright (c) 2004 Mike Wetherell.
@ -388,7 +388,7 @@ Test *regextest_9::suite()
suite->add("m", "41", "bE", "a[\\\\]b", "a\\b", "a\\b", NULL); suite->add("m", "41", "bE", "a[\\\\]b", "a\\b", "a\\b", NULL);
suite->add("e", "42", "-", "a[\\Z]b", "EESCAPE", NULL); suite->add("e", "42", "-", "a[\\Z]b", "EESCAPE", NULL);
suite->add("m", "43", "&", "a[[b]c", "a[c", "a[c", NULL); suite->add("m", "43", "&", "a[[b]c", "a[c", "a[c", NULL);
suite->add("m", "44", "EMP*", "a[\\u00fe-\\u0507][\\u00ff-\\u0300]b", "aĂ˿b", "aĂ˿b", NULL); suite->add("m", "44", "EMP*", "a[\\u00fe-\\u0507][\\u00ff-\\u0300]b", "a\304\202\313\277b", "a\304\202\313\277b", NULL);
return suite; return suite;
} }
@ -1262,13 +1262,13 @@ Test *regextest_wx_2::suite()
{ {
RegExTestSuite *suite = new regextest_wx_2; RegExTestSuite *suite = new regextest_wx_2;
suite->add("m", "1", "&*", "[^[:alpha:]]", "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ!", "!", NULL); suite->add("m", "1", "&*", "[^[:alpha:]]", "\303\200\303\201\303\202\303\203\303\204\303\205\303\206\303\207\303\210\303\211\303\212\303\213\303\214\303\215\303\216\303\217\303\220\303\221\303\222\303\223\303\224\303\225\303\226\303\230\303\231\303\232\303\233\303\234\303\235\303\236\303\237\303\240\303\241\303\242\303\243\303\244\303\245\303\246\303\247\303\250\303\251\303\252\303\253\303\254\303\255\303\256\303\257\303\260\303\261\303\262\303\263\303\264\303\265\303\266\303\270\303\271\303\272\303\273\303\274\303\275\303\276\303\277!", "!", NULL);
suite->add("m", "2", "&*", "[[:alpha:]]", " ¡¢£¤¥¦§¨©«¬­®¯°±²³´¶·¸¹»¼½¾¿×÷X", "X", NULL); suite->add("m", "2", "&*", "[[:alpha:]]", "\302\240\302\241\302\242\302\243\302\244\302\245\302\246\302\247\302\250\302\251\302\253\302\254\302\255\302\256\302\257\302\260\302\261\302\262\302\263\302\264\302\266\302\267\302\270\302\271\302\273\302\274\302\275\302\276\302\277\303\227\303\267X", "X", NULL);
suite->add("m", "3", "&*", "[^[:lower:]]", "ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ!", "!", NULL); suite->add("m", "3", "&*", "[^[:lower:]]", "\303\237\303\240\303\241\303\242\303\243\303\244\303\245\303\246\303\247\303\250\303\251\303\252\303\253\303\254\303\255\303\256\303\257\303\260\303\261\303\262\303\263\303\264\303\265\303\266\303\270\303\271\303\272\303\273\303\274\303\275\303\276\303\277!", "!", NULL);
suite->add("m", "4", "&*", "[[:lower:]]", " ¡¢£¤¥¦§¨©«¬­®¯°±²³´¶·¸¹»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞ÷x", "x", NULL); suite->add("m", "4", "&*", "[[:lower:]]", "\302\240\302\241\302\242\302\243\302\244\302\245\302\246\302\247\302\250\302\251\302\253\302\254\302\255\302\256\302\257\302\260\302\261\302\262\302\263\302\264\302\266\302\267\302\270\302\271\302\273\302\274\302\275\302\276\302\277\303\200\303\201\303\202\303\203\303\204\303\205\303\206\303\207\303\210\303\211\303\212\303\213\303\214\303\215\303\216\303\217\303\220\303\221\303\222\303\223\303\224\303\225\303\226\303\227\303\230\303\231\303\232\303\233\303\234\303\235\303\236\303\267x", "x", NULL);
suite->add("m", "5", "&*", "[^[:upper:]]", "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ!", "!", NULL); suite->add("m", "5", "&*", "[^[:upper:]]", "\303\200\303\201\303\202\303\203\303\204\303\205\303\206\303\207\303\210\303\211\303\212\303\213\303\214\303\215\303\216\303\217\303\220\303\221\303\222\303\223\303\224\303\225\303\226\303\230\303\231\303\232\303\233\303\234\303\235\303\236!", "!", NULL);
suite->add("m", "6", "&*", "[[:upper:]]", " ¡¢£¤¥¦§¨©«¬­®¯°±²³´¶·¸¹»¼½¾¿×ßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿX", "X", NULL); suite->add("m", "6", "&*", "[[:upper:]]", "\302\240\302\241\302\242\302\243\302\244\302\245\302\246\302\247\302\250\302\251\302\253\302\254\302\255\302\256\302\257\302\260\302\261\302\262\302\263\302\264\302\266\302\267\302\270\302\271\302\273\302\274\302\275\302\276\302\277\303\227\303\237\303\240\303\241\303\242\303\243\303\244\303\245\303\246\303\247\303\250\303\251\303\252\303\253\303\254\303\255\303\256\303\257\303\260\303\261\303\262\303\263\303\264\303\265\303\266\303\267\303\270\303\271\303\272\303\273\303\274\303\275\303\276\303\277X", "X", NULL);
suite->add("i", "7", "&i*", "ÀáÂãÄåÆçÈéÊëÌíÎïÐñÒóÔõÖøÙúÛüÝþ", "àÁâÃäÅæÇèÉêËìÍîÏðÑòÓôÕöØùÚûÜýÞ", "0 29", NULL); suite->add("i", "7", "&i*", "\303\200\303\241\303\202\303\243\303\204\303\245\303\206\303\247\303\210\303\251\303\212\303\253\303\214\303\255\303\216\303\257\303\220\303\261\303\222\303\263\303\224\303\265\303\226\303\270\303\231\303\272\303\233\303\274\303\235\303\276", "\303\240\303\201\303\242\303\203\303\244\303\205\303\246\303\207\303\250\303\211\303\252\303\213\303\254\303\215\303\256\303\217\303\260\303\221\303\262\303\223\303\264\303\225\303\266\303\230\303\271\303\232\303\273\303\234\303\275\303\236", "0 29", NULL);
return suite; return suite;
} }
@ -1291,12 +1291,12 @@ Test *regextest_wx_3::suite()
{ {
RegExTestSuite *suite = new regextest_wx_3; RegExTestSuite *suite = new regextest_wx_3;
suite->add("m", "1", "&*", "[^[:alpha:]]", "ёЁюабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ!", "!", NULL); suite->add("m", "1", "&*", "[^[:alpha:]]", "\321\221\320\201\321\216\320\260\320\261\321\206\320\264\320\265\321\204\320\263\321\205\320\270\320\271\320\272\320\273\320\274\320\275\320\276\320\277\321\217\321\200\321\201\321\202\321\203\320\266\320\262\321\214\321\213\320\267\321\210\321\215\321\211\321\207\321\212\320\256\320\220\320\221\320\246\320\224\320\225\320\244\320\223\320\245\320\230\320\231\320\232\320\233\320\234\320\235\320\236\320\237\320\257\320\240\320\241\320\242\320\243\320\226\320\222\320\254\320\253\320\227\320\250\320\255\320\251\320\247\320\252!", "!", NULL);
suite->add("m", "2", "&*", "[^[:lower:]]", "ёюабцдефгхийклмнопярстужвьызшэщчъ!", "!", NULL); suite->add("m", "2", "&*", "[^[:lower:]]", "\321\221\321\216\320\260\320\261\321\206\320\264\320\265\321\204\320\263\321\205\320\270\320\271\320\272\320\273\320\274\320\275\320\276\320\277\321\217\321\200\321\201\321\202\321\203\320\266\320\262\321\214\321\213\320\267\321\210\321\215\321\211\321\207\321\212!", "!", NULL);
suite->add("m", "3", "&*", "[[:lower:]]", "ЁЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪx", "x", NULL); suite->add("m", "3", "&*", "[[:lower:]]", "\320\201\320\256\320\220\320\221\320\246\320\224\320\225\320\244\320\223\320\245\320\230\320\231\320\232\320\233\320\234\320\235\320\236\320\237\320\257\320\240\320\241\320\242\320\243\320\226\320\222\320\254\320\253\320\227\320\250\320\255\320\251\320\247\320\252x", "x", NULL);
suite->add("m", "4", "&*", "[^[:upper:]]", "ЁЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ!", "!", NULL); suite->add("m", "4", "&*", "[^[:upper:]]", "\320\201\320\256\320\220\320\221\320\246\320\224\320\225\320\244\320\223\320\245\320\230\320\231\320\232\320\233\320\234\320\235\320\236\320\237\320\257\320\240\320\241\320\242\320\243\320\226\320\222\320\254\320\253\320\227\320\250\320\255\320\251\320\247\320\252!", "!", NULL);
suite->add("m", "5", "&*", "[[:upper:]]", "ёюабцдефгхийклмнопярстужвьызшэщчъX", "X", NULL); suite->add("m", "5", "&*", "[[:upper:]]", "\321\221\321\216\320\260\320\261\321\206\320\264\320\265\321\204\320\263\321\205\320\270\320\271\320\272\320\273\320\274\320\275\320\276\320\277\321\217\321\200\321\201\321\202\321\203\320\266\320\262\321\214\321\213\320\267\321\210\321\215\321\211\321\207\321\212X", "X", NULL);
suite->add("i", "6", "&i*", "ЁюАбЦдЕфГхИйКлМнОпЯрСтУжВьЫзШэЩчЪ", "ёЮаБцДеФгХиЙкЛмНоПяРсТуЖвЬыЗшЭщЧъ", "0 32", NULL); suite->add("i", "6", "&i*", "\320\201\321\216\320\220\320\261\320\246\320\264\320\225\321\204\320\223\321\205\320\230\320\271\320\232\320\273\320\234\320\275\320\236\320\277\320\257\321\200\320\241\321\202\320\243\320\266\320\222\321\214\320\253\320\267\320\250\321\215\320\251\321\207\320\252", "\321\221\320\256\320\260\320\221\321\206\320\224\320\265\320\244\320\263\320\245\320\270\320\231\320\272\320\233\320\274\320\235\320\276\320\237\321\217\320\240\321\201\320\242\321\203\320\226\320\262\320\254\321\213\320\227\321\210\320\255\321\211\320\247\321\212", "0 32", NULL);
return suite; return suite;
} }

View File

@ -39,26 +39,26 @@ sub quotecxx {
"\013" => "v", '"' => '"', "\\" => "\\" ); "\013" => "v", '"' => '"', "\\" => "\\" );
# working around lack of 'use encoding' # working around lack of 'use encoding'
if (!$utf) {
$_ = pack "U0C*", unpack "C*", $_; $_ = pack "U0C*", unpack "C*", $_;
use utf8; use utf8;
}
s/[\000-\037"\\\177-\x{ffff}]/ s/[\000-\037"\\\177-\x{ffff}]/
if ($esc{$&}) { if ($esc{$&}) {
"\\$esc{$&}"; "\\$esc{$&}";
} elsif (ord($&) > 0x9f) { } elsif (ord($&) > 0x9f && !$utf) {
if ($utf) {
$&;
} else {
sprintf "\\u%04x", ord($&); sprintf "\\u%04x", ord($&);
}
} else { } else {
sprintf "\\%03o", ord($&); sprintf "\\%03o", ord($&);
} }
/ge; /ge;
# working around lack of 'use encoding' # working around lack of 'use encoding'
if (!$utf) {
no utf8; no utf8;
$_ = pack "C*", unpack "C*", $_; $_ = pack "C*", unpack "C*", $_;
}
return ($utf ? '"' : 'L"') . $_ . '"' return ($utf ? '"' : 'L"') . $_ . '"'
} }