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

Docs updates #155

Merged
merged 1 commit into from Jan 26, 2021
Merged

Docs updates #155

merged 1 commit into from Jan 26, 2021

Conversation

FGasper
Copy link
Contributor

@FGasper FGasper commented Jan 26, 2021

This clarifies why to avoid encode_utf8() and decode_utf8() and expands
on the problem of decoding “utf8”.

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Owner

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.

Copy link
Contributor

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?

Copy link
Owner

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!>
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blah! Sorry.

Copy link
Owner

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

@dankogai dankogai merged commit d926a49 into dankogai:master Jan 26, 2021
@FGasper FGasper deleted the utf8_docs_detail branch January 26, 2021 14:50
dankogai added a commit that referenced this pull request Jan 26, 2021
=head3 decode_utf8

$string = decode_utf8($octets [, CHECK]);

B<WARNING>: L</UTF-8 vs. utf8 vs. UTF8|This function accepts invalid UTF-8!>
Copy link
Contributor

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.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 67f59dd

dankogai added a commit that referenced this pull request Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants