commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30334] - [lang] New interface CharacterEncodingNames proposal
Date Tue, 27 Jul 2004 07:59:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30334>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30334

[lang] New interface CharacterEncodingNames proposal





------- Additional Comments From scolebourne@joda.org  2004-07-27 07:59 -------
IMHO:
1) This should be a class, not an interface. Interfaces represent an API to an 
object, not a set of constants. (see SystemUtils)

2) These constants could fit on SystemUtils, eg ENCODING_UTF_8.
OR
The class name should be changed (it doesn't scan well due to the plural, 
CharacterEncodingNames.UTF_8 kindof implies UTF8 is multiple names.

3) I believe that there is a problem with encoding names in some earlier  JDKs, 
where you must use "UTF8" not "UTF-8". I believe all accept the short form.

4) Maybe a new class here does make sense if we add methods to it.

public class CharacterEncodingUtils {
// constants
 public static final UTF_8 = "UTF8"

 // methods
 public static String changeEncoding(str, from, to);
 }
...
}

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message