git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (CALCITE-2273) <Unicode 6 digit escape value> misinterpreted


Zhong Yu created CALCITE-2273:
---------------------------------

             Summary: <Unicode 6 digit escape value> misinterpreted 
                 Key: CALCITE-2273
                 URL: https://issues.apache.org/jira/browse/CALCITE-2273
             Project: Calcite
          Issue Type: Bug
            Reporter: Zhong Yu
            Assignee: Julian Hyde


 

 

The following string literal is accepted by Calcite parser, but the result value in Java is incorrect
{code:java}
U&'\+01F600'{code}
 

Cause: currently, SqlLiteral.unescapeUnicode() only intends to handle 4-digit unicode escape value in the form of \xyzw . When given the 6-digit form \+xyzwrs, it parses the first four chars "+xyz" as a hexadecimal, which succeeds too. Therefore the result value contains 4 characters: [\u0xyz, w, r, s]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-calcite-development/msg03267.html on line 97
Call Stack
#TimeMemoryFunctionLocation
10.0006363704{main}( ).../msg03267.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-calcite-development/msg03267.html on line 97
Call Stack
#TimeMemoryFunctionLocation
10.0006363704{main}( ).../msg03267.html:0