Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-place modifications made explicit in docs for encode(), decode() and decode_utf8() #54

Merged
merged 1 commit into from
Apr 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Encode.pm
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ I<ENCODING> and returns a sequence of octets. I<ENCODING> can be either a
canonical name or an alias. For encoding names and aliases, see
L</"Defining Aliases">. For CHECK, see L</"Handling Malformed Data">.

B<CAVEAT>: the input scalar I<STRING> might be modified in-place depending
on what is set in CHECK. See L</LEAVE_SRC> if you want your inputs to be
left unchanged.

For example, to convert a string from Perl's internal format into
ISO-8859-1, also known as Latin1:

Expand All @@ -492,6 +496,10 @@ I<ENCODING> can be either a canonical name or an alias. For encoding names
and aliases, see L</"Defining Aliases">; for I<CHECK>, see L</"Handling
Malformed Data">.

B<CAVEAT>: the input scalar I<OCTETS> might be modified in-place depending
on what is set in CHECK. See L</LEAVE_SRC> if you want your inputs to be
left unchanged.

For example, to convert ISO-8859-1 data into a string in Perl's
internal format:

Expand Down Expand Up @@ -607,6 +615,10 @@ Because not all sequences of octets are valid UTF-8,
it is quite possible for this function to fail.
For CHECK, see L</"Handling Malformed Data">.

B<CAVEAT>: the input I<$octets> might be modified in-place depending on
what is set in CHECK. See L</LEAVE_SRC> if you want your inputs to be
left unchanged.

=head2 Listing available encodings

use Encode;
Expand Down