Skip to content

Create BreakIterator with report locale #280

Description

@digulla

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions