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)