Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16043

Support non-BMP Unicode for JsonRowSerializationSchema

    XMLWordPrintableJSON

Details

    Description

      This is a known issue for jackson: https://github.com/FasterXML/jackson-core/issues/223

      You can see more details: https://github.com/FasterXML/jackson-core/blob/master/src/main/java/com/fasterxml/jackson/core/json/UTF8JsonGenerator.java#L2105

       

      And I also encountered this issue in my production environment. I've figured out a solution to solve this issue. Java's String.getBytes() can deal with UTF-8 encoding well. So we can do it like this:

      mapper.writeValueAsString(node).getBytes() instead of 

      mapper.writeValueAsBytes(node)

      cc jark twalthr

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              libenchao Benchao Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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