[ 
https://issues.apache.org/jira/browse/OFBIZ-13167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17897421#comment-17897421
 ] 

Nicolas Malin commented on OFBIZ-13167:
---------------------------------------

Ah, I write the ticket to have a good spot on the problem, but right not sure 
that match well the actual.

Unit test are the truth, not my quick bad describe ^^', I will update the 
commit message to match with the reality

> Truncate string with special character
> --------------------------------------
>
>                 Key: OFBIZ-13167
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13167
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework/widget
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>
> On model form, when you use a field description with a text size like :
> {code:java}
> <form...>
>     <field name="myfield" ...><display size="10"/></field>
> </form>{code}
> and your field myField contains a string with a special character like "my 
> char é, so bad truncate", the widget rendering displays "my char &e..." 
> because when truncate is executed, the string is encoded and some chars are 
> encoded : "my char &eacut;, so bad truncate".
> The size between the encoded string and the displayed string are different. 
> So to fix this, we implemented a new method to truncate the content. This 
> method identify each special char as one char, and truncate.
> "my char é, so bad truncate" encoded to "my char &eacut;, so bad truncate" 
> become "my char &eacut;..." and not "my char &e..."



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to