statement_digest、statement_digest_text等处理latin1字符有乱>码,报错1064

This commit is contained in:
akaError
2024-02-08 17:14:19 +00:00
committed by ob-robot
parent 27c4a22c70
commit 30cf1c7598
3 changed files with 25 additions and 6 deletions

View File

@ -381,6 +381,7 @@ protected:
return is_valid_char(ch) && USER_VAR_CHAR[static_cast<uint8_t>(ch)];
}
void reset_parser_node(ParseNode *node);
int64_t notascii_gb_char(const int64_t pos);
//{U}
int64_t is_latin1_char(const int64_t pos);
// ({U_2}{U}|{U_3}{U}{U}|{U_4}{U}{U}{U}
@ -440,6 +441,11 @@ protected:
return is_valid_char(ch) &&
static_cast<uint8_t>(ch) >= 0x40 && static_cast<uint8_t>(ch) <= 0xfe;
}
inline bool notascii(char ch)
{
return is_valid_char(ch) &&
(static_cast<uint8_t>(ch) >= 0x80 && static_cast<uint8_t>(ch) <= 0xFF);
}
inline bool is_latin1(char ch)
{
return is_valid_char(ch) &&