Details

      Description

      When we execute SQL with Chinese characters, we find that the server parses it in gibberish.

      After checking the code, we found that:

      org.apache.calcite.avatica.server.AvaticaJsonHandler.java line 109:

      //The readFully method USES utf-8 encoding internally.
      rawRequest = AvaticaUtils.readFully(inputStream, buffer);
      
      

      But in the org.apache.calcite.avatica.server.AvaticaJsonHandler.java line 116:

      // Decoded using iso-8859-1 Cause Chinese garble.
      final String jsonRequest = new String(rawRequest.getBytes("ISO-8859-1"), "UTF-8");
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              2k124 pufan
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 20m
                2h 20m