8191410: Unicode 10

Upgrade to Unicode 10

Reviewed-by: naoto, rriggs, igerasim
This commit is contained in:
Rachna Goel 2018-05-08 11:49:42 +05:30
parent 2dd9adbf24
commit 78bd242097
40 changed files with 39358 additions and 1049 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,16 +34,11 @@ package sun.text.normalizer;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.FileChannel;
import java.nio.file.FileSystems;
import java.util.Arrays;
import java.security.AccessController;
import java.security.PrivilegedAction;
@ -51,7 +46,7 @@ import java.security.PrivilegedAction;
public final class ICUBinary {
private static final class IsAcceptable implements Authenticate {
// @Override when we switch to Java 6
@Override
public boolean isDataVersionAcceptable(byte version[]) {
return version[0] == 1;
}
@ -93,7 +88,7 @@ public final class ICUBinary {
BufferedInputStream b=new BufferedInputStream(is, 4096 /* data buffer size */);
DataInputStream inputStream = new DataInputStream(b);
byte[] bb = new byte[120000];
byte[] bb = new byte[130000];
int n = inputStream.read(bb);
ByteBuffer bytes = ByteBuffer.wrap(bb, 0, n);
return bytes;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -194,7 +194,7 @@ final class Norm2AllModes {
}
@Override
public boolean hasBoundaryBefore(int c) { return impl.hasDecompBoundary(c, true); }
public boolean hasBoundaryBefore(int c) { return impl.hasDecompBoundaryBefore(c); }
}
public static final class ComposeNormalizer2 extends Normalizer2WithImpl {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -135,8 +135,10 @@ abstract class Normalizer2 {
if(spanLength==src.length()) {
return (String)src;
}
StringBuilder sb=new StringBuilder(src.length()).append(src, 0, spanLength);
return normalizeSecondAndAppend(sb, src.subSequence(spanLength, src.length())).toString();
if (spanLength != 0) {
StringBuilder sb=new StringBuilder(src.length()).append(src, 0, spanLength);
return normalizeSecondAndAppend(sb, src.subSequence(spanLength, src.length())).toString();
}
}
return normalize(src, new StringBuilder(src.length())).toString();
}