# The weight of 0x81309D30 will be the same with its capital letter 0x81309C39
SELECT collation(CAST(0x81309D30 AS CHAR));
SELECT HEX(WEIGHT_STRING(CAST(0x6141 AS CHAR)));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D30 AS CHAR)));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D30 AS CHAR) AS CHAR(1)));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D30 AS CHAR) AS CHAR(1)));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D30 AS CHAR) AS CHAR(3)));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D30 AS CHAR) AS CHAR(3)));
SELECT HEX(WEIGHT_STRING(CAST(0x4081309D30 AS CHAR) AS CHAR(3)));
SELECT HEX(WEIGHT_STRING(CAST(0x4081309D3081309D30 AS CHAR) AS CHAR(3)));
SELECT HEX(WEIGHT_STRING(CAST(0x4081309D3081309D3081309D30 AS CHAR) AS CHAR(3)));
SELECT HEX(WEIGHT_STRING(CAST(0x404081309D3081309D3081309D30 AS CHAR) AS CHAR(3)));

# Read 2 CHARacters from the source string (the last CHARacter is not used)
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 1, 2, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 2, 2, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 3, 2, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 4, 2, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 5, 2, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 25, 2, 0xC0));

# Read 3 CHARacters from the source string (the entire string is used)
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 1, 3, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 2, 3, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 3, 3, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 4, 3, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 5, 3, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 25, 3, 0xC0));

# Read 4 CHARacters from the source string (extra space is added)
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 1, 4, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 2, 4, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 3, 4, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 4, 4, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 5, 4, 0xC0));
SELECT HEX(WEIGHT_STRING(CAST(0x81309D3081309D3081309D30 AS CHAR), 25, 4, 0xC0));

