• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String Deprecation Decisions

 
Terry McKee
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Their seems to be a consensus that most developers are handling the following deprecated method and conostructor by specifically indicating the 'UTF-8' encoding.
The following method
public void getBytes(int srcOffset, int srcEnd, byte[] dst, int dstOffset)
becomes
public byte[] getBytes(String enc).
The deprecated constructor
public String(byte[] asciiArray, int hibyte, int offset, int count)
becomes
public String(byte[] byteArray, String enc)
I don't understand why the 'UTF-8' encoding is used instead of 'ISO-8859-1' or the platform specific encoding. Anyone have any thoghts?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic