Updated copyright
This commit is contained in:
parent
f3fc266c6f
commit
61137e0878
8 changed files with 21 additions and 38 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2001-2023 the original author or authors.
|
||||
* Copyright 2001-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -59,15 +59,15 @@ internal object Character {
|
|||
internal fun lowSurrogateOf(codePoint: Int): Char =
|
||||
((codePoint and 0x3FF) + MIN_LOW_SURROGATE.code).toChar()
|
||||
|
||||
// private const val MIN_CODE_POINT: Int = 0x000000
|
||||
// private const val MIN_CODE_POINT: Int = 0x000000
|
||||
private const val MAX_CODE_POINT: Int = 0x10FFFF
|
||||
|
||||
private const val MIN_SUPPLEMENTARY_CODE_POINT: Int = 0x10000
|
||||
|
||||
private const val SURROGATE_DECODE_OFFSET: Int =
|
||||
MIN_SUPPLEMENTARY_CODE_POINT -
|
||||
(MIN_HIGH_SURROGATE.code shl 10) -
|
||||
MIN_LOW_SURROGATE.code
|
||||
(MIN_HIGH_SURROGATE.code shl 10) -
|
||||
MIN_LOW_SURROGATE.code
|
||||
|
||||
private const val HIGH_SURROGATE_ENCODE_OFFSET: Char = MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT ushr 10)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2001-2023 the original author or authors.
|
||||
* Copyright 2001-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2001-2023 the original author or authors.
|
||||
* Copyright 2001-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -31,7 +31,7 @@ class UrlEncoderUtilTest {
|
|||
val validMap = listOf(
|
||||
"a test &" to "a%20test%20%26",
|
||||
"!abcdefghijklmnopqrstuvwxyz%%ABCDEFGHIJKLMNOPQRSTUVQXYZ0123456789-_.~=" to
|
||||
"%21abcdefghijklmnopqrstuvwxyz%25%25ABCDEFGHIJKLMNOPQRSTUVQXYZ0123456789-_.%7E%3D",
|
||||
"%21abcdefghijklmnopqrstuvwxyz%25%25ABCDEFGHIJKLMNOPQRSTUVQXYZ0123456789-_.%7E%3D",
|
||||
"%#okékÉȢ smile!😁" to "%25%23ok%C3%A9k%C3%89%C8%A2%20smile%21%F0%9F%98%81",
|
||||
"\uD808\uDC00\uD809\uDD00\uD808\uDF00\uD808\uDD00" to "%F0%92%80%80%F0%92%94%80%F0%92%8C%80%F0%92%84%80",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue