The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MarpaX::RFC::RFC3629 - Marpa parsing of UTF-8 byte sequences as per RFC3629

VERSION

version 0.001

SYNOPSIS

use strict;
use warnings FATAL => 'all';
use MarpaX::RFC::RFC3629;
use Encode qw/encode/;
use Data::HexDump;
#
# Parse octets
#
my $orig = "\x{0041}\x{2262}\x{0391}\x{002E}";
my $octets = encode('UTF-8', $orig, Encode::FB_CROAK);
my $string = MarpaX::RFC::RFC3629->new($octets)->output;
print STDERR "Octets:\n" . HexDump($octets) . "\n";
print STDERR "String:\n" . HexDump($string) . "\n";

DESCRIPTION

This module is parsing byte sequences as per RFC3629. It will croak if parsing fails.

SUBROUTINES/METHODS

new(ClassName $class: Bytes $octets --> InstanceOf['MarpaX::RFC::RFC3629'])

Instantiate a new object. Takes as parameter the octets.

output(InstanceOf['MarpaX::RFC::RFC3629'] $self --> Str)

Returns the UTF-8 string (utf8 flag might be on, depends).

SEE ALSO

Syntax of UTF-8 Byte Sequences

Marpa::R2

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://rt.cpan.org/Public/Dist/Display.html?Name=MarpaX-RFC-RFC3629. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/jddurand/marpax-rfc-rfc3629

git clone git://github.com/jddurand/marpax-rfc-rfc3629.git

AUTHOR

Jean-Damien Durand <jeandamiendurand@free.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Jean-Damien Durand.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.