Uploaded image for project: 'Red Hat build of Apache Camel for Spring Boot'
  1. Red Hat build of Apache Camel for Spring Boot
  2. CSB-4781

Marshaling the surrogate pair characters by camel-jackson results with Garbled characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • CSB-4.8
    • CSB-4.4
    • Camel
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Very Likely
    • 0

      Although unmarshaling the surrogate pair characters works as expected, marshaling the surrogate pair characters with camel-jackson results with Garbled characters.

      It works fine with other json libraries.(ex. Gson) 

      sample route

      - route:
          id: route-4081
          from:
            uri: file:data/input
            steps:
              - log: ${body}
              - unmarshal:
                  json:
                    library: Jackson
              - log: ${body[result][0]['name']}
              - marshal:
                  json:
                    library: Jackson
                    prettyPrint: true
              - log: ${body}
      

      Test data file

      {
          "result":
          [
              {
                  "name": "システム𩸽"
              }
          ]
      }
      

      Log

      2024-07-05 11:25:17.439  INFO 63035 --- [le://data/input] code.yaml:9                              : {
          "result":
          [
              {
                  "name": "システム𩸽"
              }
          ]
      }
      
      2024-07-05 11:25:17.512  INFO 63035 --- [le://data/input] code.yaml:13                             : システム𩸽
      2024-07-05 11:25:17.529  INFO 63035 --- [le://data/input] code.yaml:18                             : {
        "result" : [ {
          "name" : "システム\uD867\uDE3D"
        } ]
      }
      

          There are no Sub-Tasks for this issue.

              rnetuka@redhat.com Radovan Netuka
              rhn-support-hfuruich Hisao Furuichi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: