develooper Front page | perl.perl6.users | Postings from February 2019

decode options?

Thread Next
From:
ToddAndMargo via perl6-users
Date:
February 4, 2019 00:56
Subject:
decode options?
Message ID:
a2276683-ef64-df6a-8e65-e970a0c1d3cd@zoho.com
Hi All,

Uhhh,

     https://docs.perl6.org/routine/decode

        role Blob

        From Blob
        (Blob) method decode

        Defined as:

        multi method decode(Blob:D: Str:D $encoding = 'UTF-8' --> Str:D)

        Applies an encoding to turn the blob into a Str.

        my Blob $blob = "string".encode('utf-8');
        say $blob.decode('utf-8'); # OUTPUT: «string␤»

        On malformed utf-8 .decode will throw X::AdHoc. To handle
        sloppy utf-8 use utf8-c8.

where are the decode options?  I only see utf-8 and utf8-c8.
Am I blind?


Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About