Bug 57010 - [patch] Implement PROPER function
Summary: [patch] Implement PROPER function
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Keywords: PatchAvailable
Depends on:
Reported: 2014-09-23 16:10 UTC by Patrick Böker
Modified: 2014-10-20 19:58 UTC (History)
0 users

proper.diff (5.38 KB, text/plain)
2014-09-23 16:10 UTC, Patrick Böker
proper_java6_comp.diff (5.15 KB, patch)
2014-10-14 08:25 UTC, Patrick Böker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Böker 2014-09-23 16:10:13 UTC
Created attachment 32049 [details]

Implement and test the PROPER function. I checked some Unicode letters too, but I don't know if it behaves exactly as Excel in all Unicode (corner)cases.
Comment 1 Dominik Stadler 2014-10-13 19:35:14 UTC
Unfortunately this does not apply cleanly, Character.isAlphabetic() was added in Java 7, however we still want to be compatible with Java 6 as well, can you redo the patch with this implemented slightly different so it still works with Java 6 as well?
Comment 2 Patrick Böker 2014-10-14 08:25:03 UTC
Created attachment 32109 [details]

Replaced Character class usage with a regular expression.
Comment 3 Patrick Böker 2014-10-14 08:26:13 UTC
(Hopefully) Java 6 compatible version is there.
Comment 4 Dominik Stadler 2014-10-20 19:58:24 UTC
Applied as r1633215, I had to adjust the regular expression as "\P{IsAlphabetic}" is not available in Java 6, I used \P{IsL}, according to the unit test this has the same effect.