Non ASCII characters in document name leads to an error in t5memory

XMLWordPrintable

    • Critical
    • None
    • Fix for problem when segments are updated in t5memory and the response did contains non ASCII characters.
    • None

      Problem

      It looks like that if the t5memory response contains non ASCII characters, the t5memory connector will throw an exception when results are being requested.

      xxx.translate5.net: ERROR in editor.languageresource.service.connector: E1315 - JSON decode error: Malformed UTF-8 characters, possibly incorrectly encoded
      
      Exception:    editor_Services_Exceptions_InvalidResponse
      Level:    ERROR
      Errorcode:    E1315
      Message:    JSON decode error: Malformed UTF-8 characters, possibly incorrectly encoded
      Domain:    editor.languageresource.service.connector
      Version:    6.7.3
      File (Line):    /var/www/instances-local/instance-1031/application/modules/editor/Services/Connector/HttpApiAbstract.php (171)
      User:    XXX ({8e5dc428-52e5-4172-800e-039cd0ab161e})
      Request:    PUT https://XXX.translate5.net/editor/taskid/22548/segment/807092?_dc=1701870076568&tab=1
      Trace:#0 /var/www/instances-local/instance-1031/application/modules/editor/Services/OpenTM2/HttpApi.php(561): editor_Services_Connector_HttpApiAbstract->processResponse()
      #1 /var/www/instances-local/instance-1031/application/modules/editor/Services/OpenTM2/HttpApi.php(449): editor_Services_OpenTM2_HttpApi->processResponse()
      #2 /var/www/instances-local/instance-1031/application/modules/editor/Services/OpenTM2/Connector.php(237): editor_Services_OpenTM2_HttpApi->update()
      #3 /var/www/instances-local/instance-1031/application/modules/editor/Services/Connector.php(272): editor_Services_OpenTM2_Connector->update()
      #4 /var/www/instances-local/instance-1031/application/modules/editor/Services/Manager.php(333): editor_Services_Connector->__call()
      #5 /var/www/instances-local/instance-1031/application/modules/editor/Services/Manager.php(367): editor_Services_Manager->{closure}()
      #6 /var/www/instances-local/instance-1031/application/modules/editor/Services/Manager.php(337): editor_Services_Manager->visitAllAssociatedTms()
      #7 /var/www/instances-local/instance-1031/application/modules/editor/Models/Segment/Updater.php(145): editor_Services_Manager->updateSegment()
      #8 /var/www/instances-local/instance-1031/application/modules/editor/Models/Segment/Updater.php(92): editor_Models_Segment_Updater->afterSegmentUpdate()
      #9 /var/www/instances-local/instance-1031/application/modules/editor/Controllers/SegmentController.php(348): editor_Models_Segment_Updater->update()
      #10 /var/www/instances-local/instance-1031/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(516): Editor_SegmentController->putAction()
      #11 /var/www/instances-local/instance-1031/library/ZfExtended/Controllers/AAARestController.php(349): Zend_Controller_Action->dispatch()
      #12 /var/www/instances-local/instance-1031/vendor/shardj/zf1-future/library/Zend/Controller/Dispatcher/Standard.php(308): ZfExtended_RestController->dispatch()
      #13 /var/www/instances-local/instance-1031/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch()
      #14 /var/www/instances-local/instance-1031/vendor/shardj/zf1-future/library/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch()
      #15 /var/www/instances-local/instance-1031/vendor/shardj/zf1-future/library/Zend/Application.php(400): Zend_Application_Bootstrap_Bootstrap->run()
      #16 /var/www/instances-local/instance-1031/library/ZfExtended/Application.php(74): Zend_Application->run()
      #17 /var/www/instances-local/instance-1031/library/ZfExtended/BaseIndex.php(174): ZfExtended_Application->run()
      #18 /var/www/instances-local/instance-1031/public/index.php(35): ZfExtended_BaseIndex->startApplication()
      #19 {main}Request:Array
      (
          [currentTaskId] => 22548
          [_dc] => 1701870076568
          [tab] => 1
      )
       

       

      Where the problem comes from?

       

      This error happens when user saves a segment in the editor and translate5 updates this segment to the assigned t5memorie. After the update we receive success response as in the comment bellow.

      What should be checked:

      • is really the documentName the problem ? Because according to the response(see comment), the source and target are also containing some non ASCII characters.
      • does t5memory send some corrupted characters, so is it actually a t5memory bug and if yes, what should be fixed there?
      •  is it possible that translate5 on segment update or tmx import to send documentName with this kind of characters. How does t5memory behaves there and is that behavior correct?

            Assignee:
            Leon Kiz
            Reporter:
            Aleksandar Mitrev
            None
            None
            Aleksandar Mitrev
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None