File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ char getCP1252FromUnicode(uint32_t input) {
144144 return (char )input ;
145145 }
146146 else {
147- return '\x20 ' ; // SPACE
147+ return '\x3F ' ; // QUESTION MARK
148148 }
149149 }
150150}
@@ -274,4 +274,20 @@ char* getCP1252String(const char* input) {
274274 return ret ;
275275}
276276
277+ char toupperCP1252 (char c ) {
278+ if (c >= 'a' && c <= 'z' ) {
279+ c -= 32 ;
280+ }
281+ else if (c == '\x9A' || c == '\x9C' || c == '\x9E' ) {
282+ c -= 16 ;
283+ }
284+ else if ((c >= '\xE0' && c <= '\xF6' ) || (c >= '\xF8' && c <= '\xFE' )) {
285+ c -= 32 ;
286+ }
287+ else if (c == '\xFF' ) {
288+ c = '\x9F' ;
289+ }
290+ return c ;
291+ }
292+
277293#endif //CP1252_INCLUDED
Original file line number Diff line number Diff line change @@ -1568,11 +1568,8 @@ int avl_compare_key( const char *in_lhs, const char *in_rhs ) {
15681568 unsigned char a , b ;
15691569
15701570 for ( ;; ) {
1571- a = (unsigned char )* in_lhs ++ ;
1572- b = (unsigned char )* in_rhs ++ ;
1573-
1574- if ( a >= 'a' && a <= 'z' ) a -= 32 ; // uppercase(a);
1575- if ( b >= 'a' && b <= 'z' ) b -= 32 ; // uppercase(b);
1571+ a = (unsigned char )toupperCP1252 (* in_lhs ++ );
1572+ b = (unsigned char )toupperCP1252 (* in_rhs ++ );
15761573
15771574 if ( a ) {
15781575 if ( b ) {
You can’t perform that action at this time.
0 commit comments