For the complete documentation index, see llms.txt. This page is also available as Markdown.

ISO-8859-1

Encoding Example

import java.nio.charset.StandardCharsets;
import java.util.Arrays;

public class ExtendedAscii {
    public static void main(String [] args) {
        // Include the Euro sign, which is in Extended ASCII
        String text = "Hello, World! €";
        byte[] encodedBytes = text.getBytes(StandardCharsets.ISO_8859_1);
        String encodedString = new String(encodedBytes, StandardCharsets.ISO_8859_1);
        System.out.println("Input Text Bytes: " + Arrays.toString(encodedBytes));
        System.out.println("Encoded String: " + encodedString);
    }
}

Decoding Example

Last updated