Stay organized with collections
Save and categorize content based on your preferences.
StandardCharsets
class StandardCharsets
Constant definitions for the standard Charsets
. These charsets are guaranteed to be available on every implementation of the Java platform.
Summary
Properties |
static Charset! |
ISO Latin Alphabet No.
|
static Charset! |
Seven-bit ASCII, a.
|
static Charset! |
Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark
|
static Charset! |
Sixteen-bit UCS Transformation Format, big-endian byte order
|
static Charset! |
Sixteen-bit UCS Transformation Format, little-endian byte order
|
static Charset! |
Eight-bit UCS Transformation Format
|
Properties
ISO_8859_1
static val ISO_8859_1: Charset!
ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
US_ASCII
static val US_ASCII: Charset!
Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set
UTF_16
static val UTF_16: Charset!
Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark
UTF_16BE
static val UTF_16BE: Charset!
Sixteen-bit UCS Transformation Format, big-endian byte order
UTF_16LE
static val UTF_16LE: Charset!
Sixteen-bit UCS Transformation Format, little-endian byte order
UTF_8
static val UTF_8: Charset!
Eight-bit UCS Transformation Format
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# StandardCharsets\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nStandardCharsets\n================\n\n```\nclass StandardCharsets\n```\n\n|---|----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.nio.charset.StandardCharsets](#) |\n\nConstant definitions for the standard [Charsets](/reference/kotlin/java/nio/charset/Charset). These charsets are guaranteed to be available on every implementation of the Java platform.\n\nSummary\n-------\n\n| Properties ||\n|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| static [Charset](/reference/kotlin/java/nio/charset/Charset)! | [ISO_8859_1](#ISO_8859_1:java.nio.charset.Charset) ISO Latin Alphabet No. |\n| static [Charset](/reference/kotlin/java/nio/charset/Charset)! | [US_ASCII](#US_ASCII:java.nio.charset.Charset) Seven-bit ASCII, a. |\n| static [Charset](/reference/kotlin/java/nio/charset/Charset)! | [UTF_16](#UTF_16:java.nio.charset.Charset) Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark |\n| static [Charset](/reference/kotlin/java/nio/charset/Charset)! | [UTF_16BE](#UTF_16BE:java.nio.charset.Charset) Sixteen-bit UCS Transformation Format, big-endian byte order |\n| static [Charset](/reference/kotlin/java/nio/charset/Charset)! | [UTF_16LE](#UTF_16LE:java.nio.charset.Charset) Sixteen-bit UCS Transformation Format, little-endian byte order |\n| static [Charset](/reference/kotlin/java/nio/charset/Charset)! | [UTF_8](#UTF_8:java.nio.charset.Charset) Eight-bit UCS Transformation Format |\n\nProperties\n----------\n\n### ISO_8859_1\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ISO_8859_1: Charset!\n```\n\nISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1 \n\n### US_ASCII\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val US_ASCII: Charset!\n```\n\nSeven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set \n\n### UTF_16\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val UTF_16: Charset!\n```\n\nSixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark \n\n### UTF_16BE\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val UTF_16BE: Charset!\n```\n\nSixteen-bit UCS Transformation Format, big-endian byte order \n\n### UTF_16LE\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val UTF_16LE: Charset!\n```\n\nSixteen-bit UCS Transformation Format, little-endian byte order \n\n### UTF_8\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val UTF_8: Charset!\n```\n\nEight-bit UCS Transformation Format"]]