Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4316790

[BI] BreakIterator does not break correctly for FRANCE local

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.2
    • core-libs
    • x86
    • windows_98

      Name: rlT66838 Date: 02/26/2000


      Classic VM (build JDK-1.2.2-001, native threads , symcjit)

      BreakIterator when looking for words using local FRANCE, treats hyphenated
      French constructs as one one, and does not break on appostrophes.
      For example "donnez-lui" and "l'homme" are each treated as one word, whereas
      donnez, lui, l, and homme are all separate words in French.

      For example:

      Vector startV = new Vector(1);
      Vector wordsV = new Vector(1);
      String content = "donnez-lui, l'homme";
      BreakIterator boundary = BreakIterator.getWordInstance(Locale.FRANCE);
      boundary.setText(content);
      int startB = boundary.first();
      for (int endB = boundary.next();
        endB != boundary.DONE;
        startB = endB,
        endB = boundary.next()) {
         
         System.out.println(content.substring(startB, endB));
      }

      This will print:
      donnez-lui
      ,
      l'homme
      (Review ID: 101774)
      ======================================================================
      ###@###.### 11/2/04 18:26 GMT

            peytoia Yuka Kamiya (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: