Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 284256

Summary: Implement ICU dependencies where Needed for Unicode support
Product: [WebTools] WTP Source Editing Reporter: David Carver <d_a_carver>
Component: wst.xslAssignee: David Carver <d_a_carver>
Status: RESOLVED FIXED QA Contact: David Carver <d_a_carver>
Severity: enhancement    
Priority: P3 CC: jesper
Version: unspecifiedKeywords: helpwanted
Target Milestone: 3.2 M2   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to include ICU none

Description David Carver CLA 2009-07-22 08:51:44 EDT
ICU provides better unicode support than the built in Java runtime functionality.  PsychoPath requires some of this functionality otherwise we need to write the functionality ourselves.
Comment 1 Jesper Moller CLA 2009-07-22 13:34:11 EDT
(From the mail conversation:)

I've looked into the modularization of ICU4J, and it looks as if the normalization functionality itself is apprx. 0.5 MB but the collation is over 1 MB. That's a lot of code to (possibly) replicate for situations where the full ICU or JRE 1.6 is available.

My idea is the following: How about relying optionally on the ICU4J packages, and then dynamically try to resolve those, like this:
1) If ICU is available, use it (for normalization and collation)
2) If JRE1.6 is available, use it (for normalization and collation)
3) If neither is available, default to simple codepoint collation, and be non-conformant w.r.t. normalization.

Xerces can then repackage XPath2 with a repackaged ICU4J with just the minimal packages required, and instruct people to use that if they're on older JREs. If we do the "Import-package" stuff right, we'll still be fine with OSGi-type restrictions, and not rely on OSGi either.

I think we should see a custom implementation of normalization as a last resort since a friendly-licensed open source implementation is available.
Comment 2 Jesper Moller CLA 2009-07-30 10:43:30 EDT
Created attachment 143017 [details]
Patch to include ICU

Adds optional dependency, which should be useful for normalization and collation
Comment 3 David Carver CLA 2009-07-30 11:59:46 EDT
Import package is a good way to go.  PDE devs say that they prefer that method over using a hard dependency.
Comment 4 David Carver CLA 2009-08-14 01:16:34 EDT
patch applied. Sorry for the delay on this one it slipped through the cracks.