[JCRTOOLS-28] Check if JCR Tools app is UTF-8 aware Created: 09/Mar/16  Updated: 29/Mar/22  Resolved: 08/Apr/16

Status: Closed
Project: JCR Tools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Zdenek Skodik Assignee: Hieu Nguyen Duc
Resolution: Done Votes: 0
Labels: support
Remaining Estimate: 1d 6.5h
Time Spent: 2d 1.5h
Original Estimate: 4d

Attachments: PNG File create-node-verbände.png     PNG File dump_ok.png     PNG File find-verbände-in-dump-of-old-jcr-tools.png     PNG File find-verbände-in-dumper-new-jcr-tool.png     PNG File find-verbände-in-query-of-new-jcr-tools.png     PNG File find-verbände-in-query-of-old-jcr-tools.png     PNG File pages.png     PNG File query_ok.png    
Issue Links:
Relates
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Saigon 38
Story Points: 3
Team: Nucleus

 Description   

So one can also pass node names with UTF8 characters to be dumped.



 Comments   
Comment by Hieu Nguyen Duc [ 06/Apr/16 ]

Firstly make sure you enable UTF8 for page name.

magnolia.utf8.enabled=true

https://wiki.magnolia-cms.com/display/DEV/UTF-8+page+names

The issue was reproduced by creating UTF8 nodes in Pages app.

This is the snapshot of Query section.

This is the snapshot of Dump section.

It works OK with UTF8 node names without any problems.

Comment by Hieu Nguyen Duc [ 08/Apr/16 ]
  • Old JCR Tools doesn't work because it can't get node whose path is UTF8.
    JCRUtilsPage
    Content node = ContentUtil.getContent(repository, path);
    

    The root cause is JCRUtilsPage::setPath() escapes HTML and causes "path" to become wrong.

    this.path = StringEscapeUtils.escapeHtml(path); // this.path becomes "/Test/test-äöü/"
    
  • New JCR Tools works correctly because Vaadin Form supports UTF8, so it has correct path and able to get node.
Comment by Oanh Thai Hoang [ 08/Apr/16 ]

I did run QA and confirm that this bug does not happen in new JCR tools and it works well on mangolia version 5.4.6-SNAPSHOT

Here is my test case:
1. Create node verbände in Pages app

2. Search verbände in Dump and Query of Old JCR Query app

3. Search verbände in Dump and Query of new JCR tools app

Generated at Mon Feb 12 02:17:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.