Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testDefaultCharset (0.08 sec)

  1. okhttp/src/test/java/okhttp3/MediaTypeJvmTest.kt

        if (isAndroid) {
          // Charset.forName("'utf-8'") == UTF-8
          assertEquals("UTF-8", mediaType.charsetName())
        } else {
          assertNull(mediaType.charset())
        }
      }
    
      @Test fun testDefaultCharset() {
        val noCharset = parse("text/plain")
        assertEquals(
          "UTF-8",
          noCharset.charset(Charsets.UTF_8)!!.name(),
        )
        assertEquals(
          "US-ASCII",
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top