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
Docs updates #155
Docs updates #155
Conversation
This clarifies why to avoid encode_utf8() and decode_utf8() and expands on the problem of decoding “utf8”.
|
||
.. or croak: | ||
|
||
decode("UTF-8", "\xf8\x88\x80\x80\x80", 9); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Can you put human readable constant names as a third check argument instead of magic number 9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was shooting for consistency with the other examples above, which give 1 instead of FB_CROAK. Should I update those as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've overlooked this. 9
must be DIE_ON_ERR|LEAVE_SRC
. I'll fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe FB_CROAK
instead of DIE_ON_ERR
for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 67f59dd
@@ -499,30 +499,32 @@ followed by C<encode> as follows: | |||
|
|||
$octets = encode_utf8($string); | |||
|
|||
B<WARNING>: L</UTF-8 vs. utf8 vs. UTF8|This function can produce invalid UTF-8!> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked output of your change?
I think that this hyperlink does not work.
POD syntax for hyperlinks is L<text|name/section>
which looks like you swapped text and link parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blah! Sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this one as well
=head3 decode_utf8 | ||
|
||
$string = decode_utf8($octets [, CHECK]); | ||
|
||
B<WARNING>: L</UTF-8 vs. utf8 vs. UTF8|This function accepts invalid UTF-8!> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to fix this hyperlink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 67f59dd
This clarifies why to avoid encode_utf8() and decode_utf8() and expands
on the problem of decoding “utf8”.