```{index} single: decode (Encode::Unicode) ``` ```{index} single: Encode::Unicode::decode ``` # decode `$obj->decode($octets [, $check])` - UTF-16/32 or UCS-2 octets to a character string. The byte order comes from the object's `endian`; with none (`UTF-16`, `UTF-32`) a leading BOM decides it and a missing one means big-endian. Surrogate pairs are combined; a lone or malformed surrogate, a surrogate in UCS-2 or UTF-32, and a non-character become U+FFFD - or croak with `FB_CROAK`, or warn with `FB_WARN`. A true CHECK without `LEAVE_SRC` leaves the undecoded tail in `$octets`.