InvalidUTF8Exception

Summary

Represents an exception for an invalid UTF-8 byte sequence.

Description

Represents an exception for an invalid UTF-8 byte sequence.

Examples

Example of how this exception might be encountered
1
2
3
4
5
6
7
8
9
10
11
import System;
import System.Exceptions;
import System.Encoding;
 
try {
    byte[] encoded = [ 0xE2, 0x82 ];
    string decoded = UTF8.decode(encoded);
}
catch(InvalidUTF8Exception e) {
    Console.error(e);
}

Methods

Share

HTML | BBCode | Direct Link