How to Encode ascent character into UTF-8 without losing its representation? Any Suggestion
Method:
public static void test() throws IOException {
String input = "ABCÉ Ôpqr"; // charsetName = ISO-8859-1
String utf8String = new String(StandardCharsets.UTF_8.encode(input).array());
}
public static void test() throws IOException {
String input = "ABCÉ Ôpqr"; // charsetName = ISO-8859-1
String utf8String = new String(StandardCharsets.UTF_8.encode(input).array());
}
Required Output:
Output : "ABCÉ Ôpqr" Encoding : UTF-8
I wanted to convert String "ABCÉ Ôpqr" into its UTF-8 encoding without loosing its representation.
Output : "ABCÉ Ôpqr" Encoding : UTF-8
I wanted to convert String "ABCÉ Ôpqr" into its UTF-8 encoding without loosing its representation.
Current Output:
Output : "ABC� �pqr"
Output : "ABC� �pqr"
Method:
public static void test() throws IOException {
String input = "ABCÉ Ôpqr"; // charsetName = ISO-8859-1
String utf8String = new String(StandardCharsets.UTF_8.encode(input).array());
}
Required Output:
Output : "ABCÉ Ôpqr" Encoding : UTF-8
I wanted to convert String "ABCÉ Ôpqr" into its UTF-8 encoding without loosing its representation.
Current Output:
Output : "ABC� �pqr"
Method:
public static void test() throws IOException {
String input = "ABCÉ Ôpqr"; // charsetName = ISO-8859-1
String utf8String = new String(StandardCharsets.UTF_8.encode(input).array());
}
Required Output:
Output : "ABCÉ Ôpqr" Encoding : UTF-8
I wanted to convert String "ABCÉ Ôpqr" into its UTF-8 encoding without loosing its representation.
Current Output:
Output : "ABC� �pqr"
How to Encode ascent character into UTF-8 without losing its representation? Any Suggestion
Method:
public static void test() throws IOException {
String input = "ABCÉ Ôpqr"; // charsetName = ISO-8859-1
String utf8String = new String(StandardCharsets.UTF_8.encode(input).array());
}
Required Output:
Output : "ABCÉ Ôpqr" Encoding : UTF-8
I wanted to convert String "ABCÉ Ôpqr" into its UTF-8 encoding without loosing its representation.
Current Output:
Output : "ABC� �pqr"
lang-java