Currently, BreakIterator in SimpleTextLineWrapper and ComplexTextLineWrapper is created using
BreakIterator.getCharacterInstance()
instead of
BreakIterator.getCharacterInstance(Locale)
The former uses the VMs default locate while the latter uses the supplied one which should be filled with the value from JRParameter.REPORT_LOCALE. This can cause problems with scripts like Italian which use U+2019 as apostrophe while English uses U+0027. So even through the report locale it Locale.ITALIAN, it will split d’investimento into two words.
Test case: After creating a BreakIterator with ITALIAN, the text una strategia d’investimento should be three words and two split positions (after una and after strategia).
https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/src/net/sf/jasperreports/engine/fill/ComplexTextLineWrapper.java#L106
https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/src/net/sf/jasperreports/engine/fill/SimpleTextLineWrapper.java
Currently, BreakIterator in SimpleTextLineWrapper and ComplexTextLineWrapper is created using
instead of
The former uses the VMs default locate while the latter uses the supplied one which should be filled with the value from JRParameter.REPORT_LOCALE. This can cause problems with scripts like Italian which use U+2019 as apostrophe while English uses U+0027. So even through the report locale it Locale.ITALIAN, it will split
d’investimentointo two words.Test case: After creating a BreakIterator with ITALIAN, the text
una strategia d’investimentoshould be three words and two split positions (afterunaand afterstrategia).https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/src/net/sf/jasperreports/engine/fill/ComplexTextLineWrapper.java#L106
https://github.com/TIBCOSoftware/jasperreports/blob/master/jasperreports/src/net/sf/jasperreports/engine/fill/SimpleTextLineWrapper.java