8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00

Fixed CORE-2912 - Exception when upper casing string with lowercase y trema (code 0xFF in ISO8859_1)

This commit is contained in:
asfernandes 2013-06-20 15:43:45 +00:00
parent 0e5d964350
commit 91b8169c15

View File

@ -30,7 +30,19 @@
#include "lc_ascii.h"
static const ULONG upper_exceptions[] = {0x00B5, 0};
static const ULONG UPPER_EXCEPTIONS_B5[] = {
0x00B5, // #MICRO SIGN
0
};
static const ULONG UPPER_EXCEPTIONS_FF[] = {
0x00FF, // #LATIN SMALL LETTER Y WITH DIAERESIS
0
};
static const ULONG UPPER_EXCEPTIONS_B5_FF[] = {
0x00B5, // #MICRO SIGN
0x00FF, // #LATIN SMALL LETTER Y WITH DIAERESIS
0
};
namespace {
@ -141,7 +153,7 @@ TEXTTYPE_ENTRY2(DOS101_init)
static const ASCII POSIX[] = "C.DOS437";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -150,7 +162,7 @@ TEXTTYPE_ENTRY2(DOS107_init)
static const ASCII POSIX[] = "C.DOS865";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -159,7 +171,7 @@ TEXTTYPE_ENTRY2(DOS160_init)
static const ASCII POSIX[] = "C.DOS850";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -168,7 +180,7 @@ TEXTTYPE_ENTRY2(ISO88591_cp_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -177,7 +189,7 @@ TEXTTYPE_ENTRY2(ISO88592_cp_init)
static const ASCII POSIX[] = "C.ISO8859_2";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -186,7 +198,7 @@ TEXTTYPE_ENTRY2(ISO88593_cp_init)
static const ASCII POSIX[] = "C.ISO8859_3";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -195,7 +207,7 @@ TEXTTYPE_ENTRY2(ISO88594_cp_init)
static const ASCII POSIX[] = "C.ISO8859_4";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -204,7 +216,7 @@ TEXTTYPE_ENTRY2(ISO88595_cp_init)
static const ASCII POSIX[] = "C.ISO8859_5";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -213,7 +225,7 @@ TEXTTYPE_ENTRY2(ISO88596_cp_init)
static const ASCII POSIX[] = "C.ISO8859_6";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -222,7 +234,7 @@ TEXTTYPE_ENTRY2(ISO88597_cp_init)
static const ASCII POSIX[] = "C.ISO8859_7";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -231,7 +243,7 @@ TEXTTYPE_ENTRY2(ISO88598_cp_init)
static const ASCII POSIX[] = "C.ISO8859_8";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -240,7 +252,7 @@ TEXTTYPE_ENTRY2(ISO88599_cp_init)
static const ASCII POSIX[] = "C.ISO8859_9";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -258,7 +270,7 @@ TEXTTYPE_ENTRY2(DOS852_c0_init)
static const ASCII POSIX[] = "C.DOS852";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -267,7 +279,7 @@ TEXTTYPE_ENTRY2(DOS857_c0_init)
static const ASCII POSIX[] = "C.DOS857";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -276,7 +288,7 @@ TEXTTYPE_ENTRY2(DOS860_c0_init)
static const ASCII POSIX[] = "C.DOS860";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -285,7 +297,7 @@ TEXTTYPE_ENTRY2(DOS861_c0_init)
static const ASCII POSIX[] = "C.DOS861";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -294,7 +306,7 @@ TEXTTYPE_ENTRY2(DOS863_c0_init)
static const ASCII POSIX[] = "C.DOS863";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -303,7 +315,7 @@ TEXTTYPE_ENTRY2(DOS737_c0_init)
static const ASCII POSIX[] = "C.DOS737";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -312,7 +324,7 @@ TEXTTYPE_ENTRY2(DOS775_c0_init)
static const ASCII POSIX[] = "C.DOS775";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -321,7 +333,7 @@ TEXTTYPE_ENTRY2(DOS858_c0_init)
static const ASCII POSIX[] = "C.DOS858";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -330,7 +342,7 @@ TEXTTYPE_ENTRY2(DOS862_c0_init)
static const ASCII POSIX[] = "C.DOS862";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -339,7 +351,7 @@ TEXTTYPE_ENTRY2(DOS864_c0_init)
static const ASCII POSIX[] = "C.DOS864";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -348,7 +360,7 @@ TEXTTYPE_ENTRY2(DOS866_c0_init)
static const ASCII POSIX[] = "C.DOS866";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -357,7 +369,7 @@ TEXTTYPE_ENTRY2(DOS869_c0_init)
static const ASCII POSIX[] = "C.DOS869";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -366,7 +378,7 @@ TEXTTYPE_ENTRY2(CYRL_c0_init)
static const ASCII POSIX[] = "C.CYRL";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -375,7 +387,7 @@ TEXTTYPE_ENTRY2(WIN1250_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -384,7 +396,7 @@ TEXTTYPE_ENTRY2(WIN1251_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -393,7 +405,7 @@ TEXTTYPE_ENTRY2(WIN1252_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5);
}
@ -401,9 +413,8 @@ TEXTTYPE_ENTRY2(WIN1253_c0_init)
{
static const ASCII POSIX[] = "C.ISO8859_1";
// Should not use upper_exceptions here, as upper of micro sign is present in WIN1253.
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, NULL);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_FF);
}
@ -412,7 +423,7 @@ TEXTTYPE_ENTRY2(WIN1254_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5);
}
@ -421,7 +432,7 @@ TEXTTYPE_ENTRY2(WIN1255_c0_init)
static const ASCII POSIX[] = "C.ISO8859_5";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -430,7 +441,7 @@ TEXTTYPE_ENTRY2(WIN1256_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -439,7 +450,7 @@ TEXTTYPE_ENTRY2(WIN1257_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -448,7 +459,7 @@ TEXTTYPE_ENTRY2(NEXT_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -457,7 +468,7 @@ TEXTTYPE_ENTRY2(KOI8R_c0_init)
static const ASCII POSIX[] = "C.KOI8R";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -466,7 +477,7 @@ TEXTTYPE_ENTRY2(KOI8U_c0_init)
static const ASCII POSIX[] = "C.KOI8U";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5_FF);
}
@ -475,7 +486,7 @@ TEXTTYPE_ENTRY2(WIN1258_c0_init)
static const ASCII POSIX[] = "C.ISO8859_1";
return FAMILY_ASCII(cache, CC_C, POSIX, attributes, specific_attributes, specific_attributes_length,
cs_name, config_info, NULL, upper_exceptions);
cs_name, config_info, NULL, UPPER_EXCEPTIONS_B5);
}