Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

String Deprecation Decisions  RSS feed

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)
public byte[] getBytes(String enc).
The deprecated constructor
public String(byte[] asciiArray, int hibyte, int offset, int count)
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?
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!