Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] [Updated] (LUCENE-3983) HTMLCharacterEntities.jflex uses String.toUpperCase without Locale

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Apr 14, 2012, 9:47 AM

Post #1 of 1 (84 views)
Permalink
[jira] [Updated] (LUCENE-3983) HTMLCharacterEntities.jflex uses String.toUpperCase without Locale

[ https://issues.apache.org/jira/browse/LUCENE-3983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Rowe updated LUCENE-3983:
--------------------------------

Priority: Minor (was: Major)

> HTMLCharacterEntities.jflex uses String.toUpperCase without Locale
> ------------------------------------------------------------------
>
> Key: LUCENE-3983
> URL: https://issues.apache.org/jira/browse/LUCENE-3983
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Uwe Schindler
> Assignee: Steven Rowe
> Priority: Minor
>
> Is this expected?
> {code:java}
> "xi", "\u03BE", "yacute", "\u00FD", "yen", "\u00A5", "yuml", "\u00FF",
> "zeta", "\u03B6", "zwj", "\u200D", "zwnj", "\u200C"
> };
> for (int i = 0 ; i < entities.length ; i += 2) {
> Character value = entities[i + 1].charAt(0);
> entityValues.put(entities[i], value);
> if (upperCaseVariantsAccepted.contains(entities[i])) {
> entityValues.put(entities[i].toUpperCase(), value);
> }
> }
> {code}
> In my opinion, this should look like:
> {code:java}
> "xi", "\u03BE", "yacute", "\u00FD", "yen", "\u00A5", "yuml", "\u00FF",
> "zeta", "\u03B6", "zwj", "\u200D", "zwnj", "\u200C"
> };
> for (int i = 0 ; i < entities.length ; i += 2) {
> Character value = entities[i + 1].charAt(0);
> entityValues.put(entities[i], value);
> if (upperCaseVariantsAccepted.contains(entities[i])) {
> entityValues.put(entities[i].toUpperCase(Locale.ENGLISH), value);
> }
> }
> {code}
> (otherwise in the Turkish locale, the entities containing "i" (like "xi" -> '\u03BE') will not be detected correctly).

--
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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] lucene
For additional commands, e-mail: dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.