Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-14125

Task comment internationalization in Camunda rest-engine

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.17.0, 7.17.0-alpha3
    • 7.14.x, 7.15.x, 7.16.x, 7.17.0
    • engine
    • None

    Description

      Environment:

      • Any non-docker Camunda distro (all supported versions)
      • Any database
      • Operating system with non-UTF-8 standard encoding

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      Task comments with Persian characters are not saved correctly.

      Steps to reproduce (Required on creation):

      • Create a comment on task with following rest API call: POST /task/<id>/comment/create
        • message in Unicode (Persian), for example این نمونه است
      • Retrieve the comment using this API: GET /task/<id>/comment/<commentId>
        *The message in response is ?? ???

      Observed Behavior (Required on creation):

      After saving a comment with message این نمونه است, the persisted message is ??? ??

      Expected behavior (Required on creation):

      The correct characters are persisted in the database.

      Root Cause (Required on prioritization):

      The message is saved in a BLOB database column. When converting the String to Bytes, the character encoding is not set.

      Without a specified encoding, the default encoding is used (which is probably UTF-8 in the docker container) but differs from system to system (mine was ISO_8859_1).

      Solution Ideas (Optional):

      Set the character encoding to UTF-8 when converting the message to bytes.

      https://github.com/camunda/camunda-bpm-platform/blob/e8411f499a28bd9262045ae966283a786dce901d/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/CommentEntity.java#L62

      Hints (optional):

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          1. image(4).png
            image(4).png
            22 kB
          2. image-2021-11-21-15-45-22-871.png
            image-2021-11-21-15-45-22-871.png
            110 kB
          3. screenshot-1.png
            screenshot-1.png
            247 kB
          4. screenshot-2.png
            screenshot-2.png
            263 kB

          Activity

            People

              miklas.boskamp Miklas Boskamp
              Simin Simin Ghasemi
              Miklas Boskamp Miklas Boskamp
              Tassilo Weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce