- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 162 for Punycode (0.26 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt
* limitations under the License. */ package okhttp3.internal.idn import okio.Buffer import okio.ByteString.Companion.encodeUtf8 /** * An [RFC 3492] punycode decoder for converting ASCII to Unicode domain name labels. This is * intended for use in Internationalized Domain Names (IDNs). * * This class contains a Kotlin implementation of the pseudocode specified by RFC 3492. It includes
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 03 03:04:50 GMT 2024 - 8.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/idn/PunycodeTest.kt
) assertNull( Punycode.encode(a1000MaxCodePoint.repeat(2)), ) } @Test fun invalidPunycode() { assertNull(Punycode.decode("xn--ls8h=")) } private fun testEncodeDecode( unicode: String, punycode: String, ) { assertEquals(unicode, Punycode.decode(punycode)) assertEquals(punycode, Punycode.encode(unicode)) } private fun testDecodeOnly(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/net/InternetDomainNameTest.java
public final class InternetDomainNameTest extends TestCase { private static final InternetDomainName UNICODE_EXAMPLE = InternetDomainName.from("j\u00f8rpeland.no"); private static final InternetDomainName PUNYCODE_EXAMPLE = InternetDomainName.from("xn--jrpeland-54a.no"); /** The Greek letter delta, used in unicode testing. */ private static final String DELTA = "\u0394";
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Mar 05 13:16:00 GMT 2024 - 17.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/UrlComponentEncodingTester.kt
encodings[ 0x1f] = encoding // Unit Separator encodings[ 0x7f] = encoding // Delete } fun nonAscii(encoding: Encoding) = apply { encodings[UNICODE_2] = encoding encodings[UNICODE_3] = encoding encodings[UNICODE_4] = encoding } fun test(component: Component) = apply { for ((codePoint, encoding) in encodings) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 12.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WebPlatformToAsciiTest.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/test/resources/web-platform-test-toascii.json
"output": "x..xn--zca" }, { "comment": "Invalid Punycode", "input": "xn--a", "output": null }, { "input": "xn--a.xn--zca", "output": null }, { "input": "xn--a.ß", "output": null }, { "input": "xn--ls8h=", "output": null }, { "comment": "Invalid Punycode (contains non-ASCII character)", "input": "xn--tešla", "output": null
Json - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 5.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt
} // 2. Normalize, from bufferB to bufferA. val normalized = normalizeNfc(bufferB.readUtf8()) bufferA.writeUtf8(normalized) // 3. For each label, convert/validate Punycode. val decoded = Punycode.decode(bufferA.readUtf8()) ?: return null // 4.1 Validate. // Must be NFC. if (decoded != normalizeNfc(decoded)) return null // TODO: Must not begin with a combining mark.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java
public final class InternetDomainNameTest extends TestCase { private static final InternetDomainName UNICODE_EXAMPLE = InternetDomainName.from("j\u00f8rpeland.no"); private static final InternetDomainName PUNYCODE_EXAMPLE = InternetDomainName.from("xn--jrpeland-54a.no"); /** The Greek letter delta, used in unicode testing. */ private static final String DELTA = "\u0394";
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Mar 05 13:16:00 GMT 2024 - 17.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookieTest.kt
val unicode = "https://長.長.長崎.jp".toHttpUrl() assertThat(parse(unicode, "a=b; domain=長.長崎.jp")).isNotNull() assertThat(parse(unicode, "a=b; domain=長崎.jp")).isNull() val punycode = "https://xn--ue5a.xn--ue5a.xn--8ltr62k.jp".toHttpUrl() assertThat(parse(punycode, "a=b; domain=xn--ue5a.xn--8ltr62k.jp")).isNotNull() assertThat(parse(punycode, "a=b; domain=xn--8ltr62k.jp")).isNull() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 24.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
* ``` * * @param domain A canonicalized domain. An International Domain Name (IDN) should be punycode * encoded. */ fun getEffectiveTldPlusOne(domain: String): String? { // We use UTF-8 in the list so we need to convert to Unicode. val unicodeDomain = IDN.toUnicode(domain) val domainLabels = splitDomain(unicodeDomain) val rule = findMatchingRule(domainLabels)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.7K bytes - Viewed (0)