Better function header dump
[official-gcc.git] / libjava / testsuite / libjava.lang / pr27171.java
bloba07fea7364789336c8f26673f1d84a30db84c273
1 public class pr27171 {
3 public static void main(String[] args) throws Throwable {
4 // Isolated low surrogate.
5 char x = 56478; // 0xdc9e
6 String xs = new String(new char[] { x });
7 // Note that we fix a result for our implementation; but
8 // the JDK does something else.
9 System.out.println(xs.getBytes("UTF-8").length);
11 // isolated high surrogate -- at end of input stream
12 char y = 0xdaee;
13 String ys = new String(new char[] { y });
14 // Note that we fix a result for our implementation; but
15 // the JDK does something else.
16 System.out.println(ys.getBytes("UTF-8").length);