In Java 1.7+, java.nio.charset.StandardCharsets defines constants for Charset
including UTF_8
.
import java.nio.charset.StandardCharsets;
...
StandardCharsets.UTF_8.name();
For Android: minSdk 19
More Related Contents:
- What would be the value of variable after executing the following statement
- InvalidKeyException Illegal key size
- How to write a UTF-8 file with Java?
- Java Compare Two Lists
- How to split a string between letters and digits (or between digits and letters)?
- Content is not allowed in Prolog SAXParserException
- How do I configure Maven for offline development?
- How to parse JSON Array (Not Json Object) in Android
- for loop optimization
- Using iTextPDF to trim a page’s whitespace
- In which case do you use the JPA @JoinTable annotation?
- Android: Switch camera when button clicked
- Most idiomatic way to print a time difference in Java?
- fastest (low latency) method for Inter Process Communication between Java and C/C++
- How to hide warning “Illegal reflective access” in java 9 without JVM argument?
- Android Color Notification Icon
- Trying to find all occurrences of an object in Arraylist, in java
- Producing executable jar in NetBeans
- No color highlight in Eclipse in some files
- Java Sort List of Lists
- How to keep fields sequence in Gson serialization
- Subtract two dates in Java [duplicate]
- How to pass an Integer Array to IN clause in MyBatis
- Java JTable setting Column Width
- When do I have to change the serialVersionUID?
- Lambda implementation of interface in kotlin
- Date vs TimeStamp vs calendar?
- Encrypt and decrypt a String in java
- How can I give my Java application a unique process name?
- Comparison Method violates its general contract in Java 7