sql-parser
sql-parser copied to clipboard
UTF-8 support
It is not possible to pass non ascii identifiers right now. It would be great to support utf-8 queries.
Flex can process utf-8 characters with regex like this
%option 8bit
([A-Za-z0-9_]|[\xc2-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]|[\xf0-\xf4][\x80-\xbf][\x80-\xbf][\x80-\xbf])* {
yylval->sval = strdup(yytext);
return SQL_IDENTIFIER;
}
Good observation! Thanks! Ultimately we should add UTF-8 support. Right now we are focusing on different efforts though. If you have something working already, feel free to open a PR and we can work on integrating it into the master asap.
Thanks!