Encode-Wide
view release on metacpan or search on metacpan
9. Fallback: HTML::Entities::encode_entities_numeric for any remaining
non-ASCII codepoints
10. If non-ASCII still remains after the fallback: invoke complain callback,
carp a TODO warning, then croak a BUG error
## wide\_to\_xml
Convert a Unicode or UTF-8 string into a pure-ASCII XML fragment. Every
non-ASCII character is replaced by a hexadecimal numeric entity
(e.g. `é`). Only numeric entities are used because named HTML entities
such as `é` are not defined in XML 1.0 outside of XHTML with a DTD.
Em-dashes and en-dashes are folded to a plain ASCII hyphen `-`.
Bare ampersands, angle brackets, and double-quotes are escaped so the output
is valid XML element content.
### Arguments
All parameters are passed as a flat key-value list. The `string` key may be
omitted when passing a bare positional string as the first argument.
See ["COMMON PARAMETERS"](#common-parameters) for `string`, `keep_hrefs`, and `complain`.
lib/Encode/Wide.pm view on Meta::CPAN
}
return $string;
}
=head2 wide_to_xml
Convert a Unicode or UTF-8 string into a pure-ASCII XML fragment. Every
non-ASCII character is replaced by a hexadecimal numeric entity
(e.g. C<é>). Only numeric entities are used because named HTML entities
such as C<é> are not defined in XML 1.0 outside of XHTML with a DTD.
Em-dashes and en-dashes are folded to a plain ASCII hyphen C<->.
Bare ampersands, angle brackets, and double-quotes are escaped so the output
is valid XML element content.
=head3 Arguments
All parameters are passed as a flat key-value list. The C<string> key may be
omitted when passing a bare positional string as the first argument.
See L</COMMON PARAMETERS> for C<string>, C<keep_hrefs>, and C<complain>.
( run in 0.825 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )