OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [pr27171.java] - Blame information for rev 767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
public class pr27171 {
2
 
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);
10
 
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);
17
        }
18
}
19
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.