You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Thorsten Möller (Created JIRA)" <ji...@apache.org> on 2011/12/11 19:20:39 UTC
[jira] [Created] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
If possible remove dependency to ICU4J by using Java built-in functionality
---------------------------------------------------------------------------
Key: JENA-177
URL: https://issues.apache.org/jira/browse/JENA-177
Project: Jena
Issue Type: Wish
Components: Jena, IRI
Reporter: Thorsten Möller
Priority: Minor
Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Damian Steer (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damian Steer updated JENA-177:
------------------------------
Attachment: jena-icu4j.patch
IRI-icu4j.patch
So nearly there:
IRI-icu4j.patch and jena-icu4j.patch almost remove our dependency on icu4j. In two cases I have written a couple of crazy functions to work around the jdk missing unicode property information.
However we have a problem with java.net.IDN (puny code). Like many jdk replacements it clearly originates in icu4j, but it doesn't act in the same way. Is this a jdk bug?
icu4j:
IDNA.convertIDNToASCII("André",
IDNA.USE_STD3_RULES | IDNA.ALLOW_UNASSIGNED);
works.
jdk:
IDN.toASCII("André", IDN.USE_STD3_ASCII_RULES|IDN.ALLOW_UNASSIGNED);
"java.lang.IllegalArgumentException: Contains non-LDH characters"
I've included the non-working replacement commented out in the IRI patch. Anyone have a clue??
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-177) If possible remove dependency to
ICU4J by using Java built-in functionality
Posted by "Andy Seaborne (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180264#comment-13180264 ]
Andy Seaborne commented on JENA-177:
------------------------------------
Great - less is more.
Now we've done a release cycle, we can release jena-top v1 at leisure and the rest catches up.
We could have a "jena-dependencies" module which jena-core depends on which is a release-sync'ed POM artifact. This separates out the dependency mgt from jena-top, which is used for misc info, plugin mgt as well as dependency mgt.
Then jena-iri can now be independent of jena-dependencies and still use jena-top.
Something to consider when/if we reorg the project module structure.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Assignee: Damian Steer
> Priority: Minor
> Fix For: Jena 2.7.1
>
> Attachments: IDNP.java, IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-177) If possible remove dependency to
ICU4J by using Java built-in functionality
Posted by "Thorsten Möller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172246#comment-13172246 ]
Thorsten Möller commented on JENA-177:
--------------------------------------
BTW, ICU4J is modularized, meaning that it provides options to build smaller ICU4J modules, see http://userguide.icu-project.org/packaging-icu4j. Seems that the "Normalizer" module would be sufficient, provided that DNS name normalization is moved to java.net.IDN available since JDK1.6 (as done by the patch).
This would be another option to reduce the overhead in case entirely factoring out ICU4J is not possible at the moment. Unfortunately, I'm not aware of a Maven repository that already contains ICU4J modules. Is there an ASF Maven repository, and would it be an option to upload an ICU4J module?
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Thorsten Möller (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thorsten Möller updated JENA-177:
---------------------------------
Remaining Estimate: 0h
Original Estimate: 0h
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (JENA-177) If possible remove
dependency to ICU4J by using Java built-in functionality
Posted by "Damian Steer (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178531#comment-13178531 ]
Damian Steer edited comment on JENA-177 at 1/2/12 8:24 PM:
-----------------------------------------------------------
Thorsten: yep, it seems to be just plain wrong in this case. The USE...RULES bit is a post-check to ensure the encoded name is a well behaved dns name. It seems that IDN is doing this check too early, before it's finished the encoding (the answers without that check are correct) which is bizarre.
I've written a little wrapper that performs the check itself. 8 failures -> 2 failures!
Andy: ah, that is a good clue for the other failures. If you try decoding:
xn--a-bpad.example.org
xn--andr--ep.example.org
IDN and ICU4J 4.8.1.1 don't throw an exception but return this value (i.e. no decoding occurs). ICU4J 3.4.4 however does throw an error.
Tempted to simply disable those tests, although they are, ominously, generated from and xml file somehow.
was (Author: shellac):
Thorsten: yep, it seems to be just plain wrong in this case. The USE...RULES bit is a post-check to ensure the encoded name is a well behaved dns name. It seems that IDN is doing this check too early, before it's finished the encoding (the answers without that check are correct) which is bizarre.
I've written a little wrapper that performs the check itself. 8 failures -> 2 failures!
Andy: ah, that is a good clue for the other failures. If you try decoding:
xn--a-bpad.example.org
xn--andr--ep.example.org
IDN and ICU4J 4.8.1.1 don't throw and exception but return this value (i.e. no decoding occurs). ICU4J 3.4.4 however does throw an error.
Tempted to simply disable those tests, although they are, ominously, generated from and xml file somehow.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Damian Steer (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damian Steer updated JENA-177:
------------------------------
Attachment: (was: IRI-icu4j.patch)
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IDNP.java, IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-177) If possible remove dependency to
ICU4J by using Java built-in functionality
Posted by "Thorsten Möller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13167161#comment-13167161 ]
Thorsten Möller commented on JENA-177:
--------------------------------------
Most occurrences of ICU4J classes factored out. Attention: unfinished work that when applied will result in compiler errors (deliberate decision to easily find the places that still need work).
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI.patch
>
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-177) If possible remove dependency to
ICU4J by using Java built-in functionality
Posted by "Damian Steer (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178531#comment-13178531 ]
Damian Steer commented on JENA-177:
-----------------------------------
Thorsten: yep, it seems to be just plain wrong in this case. The USE...RULES bit is a post-check to ensure the encoded name is a well behaved dns name. It seems that IDN is doing this check too early, before it's finished the encoding (the answers without that check are correct) which is bizarre.
I've written a little wrapper that performs the check itself. 8 failures -> 2 failures!
Andy: ah, that is a good clue for the other failures. If you try decoding:
xn--a-bpad.example.org
xn--andr--ep.example.org
IDN and ICU4J 4.8.1.1 don't throw and exception but return this value (i.e. no decoding occurs). ICU4J 3.4.4 however does throw an error.
Tempted to simply disable those tests, although they are, ominously, generated from and xml file somehow.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-177) If possible remove dependency to
ICU4J by using Java built-in functionality
Posted by "Thorsten Möller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178469#comment-13178469 ]
Thorsten Möller commented on JENA-177:
--------------------------------------
some more tests (in case it helps):
IDN.toASCII("André") // no exception; returns "xn--andr-epa"
IDN.toASCII("André", IDN.ALLOW_UNASSIGNED); // no exception; returns "xn--andr-epa"
IDN.toASCII("André", IDN.USE_STD3_ASCII_RULES); // same exception
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Damian Steer (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damian Steer resolved JENA-177.
-------------------------------
Resolution: Fixed
Fix Version/s: Jena 2.7.1
Assignee: Damian Steer
Fixed in jena 2.7.1, IRI 0.9.1 and jena-top 1.
There's a slight bootstrapping issue in that we need to get jena-top out before icu4j will actually disappear.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Assignee: Damian Steer
> Priority: Minor
> Fix For: Jena 2.7.1
>
> Attachments: IDNP.java, IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Damian Steer (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damian Steer updated JENA-177:
------------------------------
Attachment: (was: jena-icu4j.patch)
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IDNP.java, IRI-icu4j.patch, IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Thorsten Möller (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thorsten Möller updated JENA-177:
---------------------------------
Attachment: IRI.patch
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI.patch
>
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-177) If possible remove dependency to
ICU4J by using Java built-in functionality
Posted by "Paolo Castagna (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172253#comment-13172253 ]
Paolo Castagna commented on JENA-177:
-------------------------------------
> BTW, ICU4J is modularized, meaning that it provides options to build smaller ICU4J modules, see http://userguide.icu-project.org/packaging-icu4j.
Yep, I remember trying something similar... it wasn't a dream:
http://sourceforge.net/mailarchive/forum.php?thread_name=4A44EB0D.3020206%40hplb.hpl.hp.com&forum_name=jena-devel
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Andy Seaborne (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne closed JENA-177.
------------------------------
Jenkins is happy.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Assignee: Damian Steer
> Priority: Minor
> Fix For: Jena 2.7.1
>
> Attachments: IDNP.java, IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Thorsten Möller (Updated JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thorsten Möller updated JENA-177:
---------------------------------
Attachment: jena2.patch
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI.patch, jena2.patch
>
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JENA-177) If possible remove dependency to ICU4J
by using Java built-in functionality
Posted by "Damian Steer (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Damian Steer updated JENA-177:
------------------------------
Attachment: IDNP.java
IRI-icu4j.patch
jena-icu4j.patch
Final patches and a new class for IRI.
* Replaces icu4j functions with jdk equivalents.
* Provides two functions concerning unicode properties that aren't present in jdk.
* Removes two IDN problem cases from tests which no longer throw exceptions in current icu4j and jdk.
* Wraps jdk IDN to work around an apparent bug.
All tests pass (save noted issue above).
Note that we'll still need to remove icu4j from JenaTop.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IDNP.java, IRI-icu4j.patch, IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (JENA-177) If possible remove
dependency to ICU4J by using Java built-in functionality
Posted by "Damian Steer (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178531#comment-13178531 ]
Damian Steer edited comment on JENA-177 at 1/2/12 8:25 PM:
-----------------------------------------------------------
Thorsten: yep, it seems to be just plain wrong in this case. The USE...RULES bit is a post-check to ensure the encoded name is a well behaved dns name. It seems that IDN is doing this check too early, before it's finished the encoding (the answers without that check are correct) which is bizarre.
I've written a little wrapper that performs the check itself. 8 failures -> 2 failures!
Andy: ah, that is a good clue for the other failures. If you try decoding:
xn--a-bpad.example.org
xn--andr--ep.example.org
IDN and ICU4J 4.8.1.1 don't throw an exception but return this value (i.e. no decoding occurs). ICU4J 3.4.4 however does throw an error.
Tempted to simply disable those tests, although they are, ominously, generated from an xml file somehow.
was (Author: shellac):
Thorsten: yep, it seems to be just plain wrong in this case. The USE...RULES bit is a post-check to ensure the encoded name is a well behaved dns name. It seems that IDN is doing this check too early, before it's finished the encoding (the answers without that check are correct) which is bizarre.
I've written a little wrapper that performs the check itself. 8 failures -> 2 failures!
Andy: ah, that is a good clue for the other failures. If you try decoding:
xn--a-bpad.example.org
xn--andr--ep.example.org
IDN and ICU4J 4.8.1.1 don't throw an exception but return this value (i.e. no decoding occurs). ICU4J 3.4.4 however does throw an error.
Tempted to simply disable those tests, although they are, ominously, generated from and xml file somehow.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JENA-177) If possible remove dependency to
ICU4J by using Java built-in functionality
Posted by "Andy Seaborne (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JENA-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178458#comment-13178458 ]
Andy Seaborne commented on JENA-177:
------------------------------------
A clue, maybe.
When I tried upgrading from ICU4J 3.4.4 to any ICU4J that was newer during the release cycle, some tests started failing on punycode. So, it maybe that the replacements are right and that we have dependency of old behaviour.
> If possible remove dependency to ICU4J by using Java built-in functionality
> ---------------------------------------------------------------------------
>
> Key: JENA-177
> URL: https://issues.apache.org/jira/browse/JENA-177
> Project: Jena
> Issue Type: Wish
> Components: IRI, Jena
> Reporter: Thorsten Möller
> Priority: Minor
> Attachments: IRI-icu4j.patch, IRI.patch, jena-icu4j.patch, jena2.patch
>
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Jena-core and IRI currently depend on ICU4J for implementing Unicode support. Since ICU4J is rather heavyweight of which a rather small fraction is used, we should check if there is a way of implementing the functionality in an alternative way, either by (i) using built-in (standard) Java classes, (ii) other libraries that are already dependencies, or (iii) in a completely alternative way. This is also supported by the fact that since relevant parts have been initially implemented, Unicode support has been considerably extended in Java, see http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira