Bug 841078
| Summary: | Garbled chinese char in generated PNG image and form from jboss BRMS console of BRMS5.3 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | xinwang <xinwang> | ||||||||
| Component: | Internationalization, jBPM 5 | Assignee: | Mark Proctor <mproctor> | ||||||||
| Status: | CLOSED UPSTREAM | QA Contact: | |||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | BRMS 5.3.0.GA | CC: | alazarot, kverlaen, mbaluch, nobody, tkobayas | ||||||||
| Target Milestone: | ER4 | ||||||||||
| Target Release: | BRMS 5.3.1 GA | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: |
Images of business processes that were generated in PNG format, that used Chinese characters in the name, comment, and display name, were not rendering properly in the business central console and the Chinese characters were garbled. This issue has been resolved and the Chinese characters appear correctly.
|
Story Points: | --- | ||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2025-02-10 03:20:18 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 598786 [details]
garbled char in Task Form
Sent a pull request. https://github.com/droolsjbpm/jbpm-designer/pull/5 Created attachment 616946 [details]
repository_export_i18n.zip
Attached repository_export_i18n.zip for test. (not related to png files attached by xinwang)
To test:
- Import repository_export.xlm
- Open i18n process in defaultPackage
- Click 'PNG' on the bottom bar
Actual -> Generated png has garbled chars
Expected -> Generated png has 'こんにちは' node
- Click 'BPMN2' on the bottom bar and click 'Save to file'
Actual -> Saved bpmn2 has garbled drools:taskName attribute
Expected -> Saved bpmn2 has drools:taskName="こんにちはタスク"
- Click 'Generate Task Form Templates'
Actual -> The response html has ??????-taskform
Expected -> The response html has こんにちはタスク-taskform
- Click 'Edit Task Form' on top of the task node
Actual -> There are garbled chars for "User Task Form:" and "Comment" in the editor
Expected -> "User Task Form: i18n.こんにちはタスク" in the editor
# I think Designer 2.3.x will not show Comment value here. But you can confirm it by 'Switch Mode'
Your pull request has been merged into Designer master. Thanks Toshiya! Fix merged into Designer 2.3.x (prod) branch @Toshiya, about
>> # I think Designer 2.3.x will not show Comment value here. But you can confirm it by 'Switch Mode' <<
This is kind of concerning as with Designer from 2.3.x branch there is no more switch mode button in the form editor :)
> >> # I think Designer 2.3.x will not show Comment value here. But you can confirm it by 'Switch Mode' <<
>
> This is kind of concerning as with Designer from 2.3.x branch there is no
> more switch mode button in the form editor :)
Thx, Tiho. I revise my comment ->
In Desinger 2.3.x, you can confirm the fix with sources in the left pane and appearance in the right pane.
Tested with ER3, standalone, using the repository and procedure in comment 5: - PNG: OK - BPMN2 (source): OK - Generate Task Form Templates: OK ! but the taskform itself then has no encoding defined, so if the default encoding in your browser is not UTF-8, the characters in <div id="header"> and <div class="div_checkbox"><![CDATA[<here go the chinese chars>]]></div> look garbled - Edit Task Form: the above might be why it is still garbled here, definitely not okay. After specifically setting the encoding in my browser to UTF-8, it still looks garbled. Are we talking about the generated forms? On user - defined forms you have to set that yourself. > ! but the taskform itself then has no encoding defined, so if the default encoding in your browser is not UTF-8, the characters in <div id="header"> and <div class="div_checkbox"><![CDATA[<here go the chinese chars>]]></div> look garbled
- Edit Task Form: the above might be why it is still garbled here, definitely not okay. After specifically setting the encoding in my browser to UTF-8, it still looks garbled.
I think you have faced a gabage taskform which was included in my previous repository_export_i18n.zip. Sorry. I have uploaded a new repository_export_i18n_form.zip for test. This time I think you will see an empty content for the task form editor so this is a new issue (but should be fixed in this BZ, I think). Also I think I have identified its cause so will raise a new pull request. Please stay tuned.
Sent a pull request https://github.com/droolsjbpm/jbpm-designer/pull/6 (In reply to comment #18) > I think you have faced a gabage taskform which was included in my previous > repository_export_i18n.zip. > This time I think you will see an > empty content for the task form editor so this is a new issue Confirmed - no content in task form editor. Though I think it's not due to old task forms being present - the Designer used to simply replace them with new ones, IIRC. It was probably again something stuck in the browser cache after I generated the task forms the first time, with a non-UTF-8 default encoding. Reloading the Guvnor page or restarting the browser seems not to be enough here either. Cleared repository and newly started server might be though. (In reply to comment #16) > Are we talking about the generated forms? On user - defined forms you have > to set that yourself. I was talking about generated forms. When you click the 'Generate Task Form Templates', you get to a new page with links to those generated forms. Clicking that link gives you the source of the form. What I get is: <html> <body> <script type='text/javascript'>... Nothing like '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">' present. So, if I understand it right, the browser serves it in whatever encoding you have set as the default - which might not be UTF-8. (In reply to comment #20) > the Designer > used to simply replace them with new ones, IIRC. It should. But this bug messed the behaviour. TaskFormsEditorServlet tries to get the taskform resource with non-URLEncoded URL hence it picked the old garbage taskform. With the new repository_export_i18n_form.zip, the non-URLEncoded URL cannot find any resources hence it results in no content. The new pull request fixes the issue. > Nothing like '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">' present. That's true so it's worth to consider if we should add <meta> tag to taskform. But it's a problem only when you open the taskform with the link after 'Generate Task Form Templates'. TaskFormsEditor should be fixed with the new pull request. Will add Toshiya's last pull request and set the charset to utf-8 in the generated taskform templates. ^ done. fixes are in the designer 2.3.x production branch) Hello, I have reported an issue about persisting corrupted utf8 characters by human task service, see https://bugzilla.redhat.com/show_bug.cgi?id=865837. Please could you please provide me with a feedback if you have faced the same problem? Thanks Jiri Hi Jiri, I haven't hit nor got a report from a support ticket about persisting utf8 characters issue so far. Cheers, Toshiya Hi Toshiya, thanks for the feedback. Regards, Jiri Looks good, verified with ER4. This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |
Created attachment 598784 [details] images Description of problem: 1. For the generated PNG and form from the BRMS console of BRMS5.3, there are garbled char for chinese code, I attached the clipped image for show,environment is UTF-8 in fedora17. Version-Release number of selected component (if applicable): BRMS 5.3.0 GA How reproducible: Steps to Reproduce: 1. Create a BPMN2 process in Eclipse/Guvnor Editor, name the HumanTaskNode in Chinese, Name the comment in Chinese, Name the DisplayName in Chinese 2. From BRMS console, BPMN2 Web designer, click "Generate Task Form Templates" generate the BPMN2 diagram 3. In Business-Central, view the process diagram from "Process" -> "Process Overview" -> "Executions Details", click the "diagram" button Actual results: Garbled character shown in diagram Expected results: Correct Chinse character shown in diagram Additional info: