[ 
https://issues.apache.org/jira/browse/OFBIZ-13167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nicolas Malin closed OFBIZ-13167.
---------------------------------
    Resolution: Done

> 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="15"/></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 &ea...ate" 
> 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;, ...ate" and not "my char &eac...ate"
>  



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

Reply via email to