commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bug #13111] Classes in gnu.java.nio.charset.iconv should be


From: Ito Kazumitsu
Subject: [commit-cp] [bug #13111] Classes in gnu.java.nio.charset.iconv should be extendable
Date: Tue, 17 May 2005 22:14:40 +0000
User-agent: w3m/0.5.1

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13111>

                 Summary: Classes in gnu.java.nio.charset.iconv should be
extendable
                 Project: classpath
            Submitted by: itokaz
            Submitted on: Tue 05/17/05 at 22:14
                Category: classpath
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: None

    _______________________________________________________

Details:

Classes in gnu.java.nio.charset.iconv are declared final, but actually
they should be extendable because in some cases char/byte conversion
with iconv is not final but needs modification.

There are cases where iconv may be correct but the real world is
different.

One of such cases I know of is the case of Shift_JIS.

Iconv maps in case of Shift_JIS:

  byte '\\' <--> char 0x00a5 
  byte '~'  <--> char 0x203e

This may be correct in the light of the standard JIS, but in practice
the standard is not respected.  And preferred mapping is:

  byte '\\' <--> char '\\'
  byte '~'  <--> char '~'

That is, identical conversion for US-ASCII is preferred even if the
charset is Shift_JIS. And this is the behavior of Sun's java.

Should iconv be modified so that it copes with the real-world practice?
Maybe yes, but it may be difficult.

Let iconv respect the standard. But we need something that can be used
in the real world.

So I suggest that classes in gnu.java.nio.charset.iconv should be
extendable so that we can write slightly modified subclasses.

I think I will submit my suggested patch to the mailing list.







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13111>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]