Elephant new update includes support for ISO-8859-1 not defined entities

New & Noteworthy
20/7/17
Lluís Turró Cutiller
9.442
0
java

Most of BaaS services are deployed using the ISO-8850-1 character set, thus, users need to deal with characters in the weird range that starts on 128 and runs until 159. To make it more complicated, those characters include the euro sign.

Characters in the range between 128 and 159

€ ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ ? ‘ ’ “ ” • – — ˜ ™ š › œ ? Ÿ

129, 141, 143, 144, 157 are NOT USED. As is. Not used, blank.

The whole range states as not defined.

The problem

Since some BrightSide modules include text edition, adding these characters meant to know the HTML entity. For example, for € is €. Not a big deal.

The real problem arises when users copied and pasted text from a text editor like OpenOffice Writer, LibreOffice Writer or MS Word. Those editors automatically change normal double quotes to left and right double quotes. And double or triple hyphens to en or em dashes. And guess what, they exists within the 128 to 159 range in the ISO-8859-1 character set. And as the spec says, they are not defined.

The approach

HTML pages and browser text areas live a different life. While the euro symbol may appear as a question mark ? in a page, in the same page an editable text area may accept euro symbols without problems.

Elephant now escape those characters on assignment. Something like setValue(escapeWeirdEntities(value)). Source code will be soon available at Full report.

The conclusion

Users will no longer need to know about HTML entities, nor be aware of special double quotes or dashes. The whole set of symbols will automatically translate to entities and restored to symbols when editing.

Comentaris