Skip to content

Improve documentation of string encoding conversion functions#1418

Merged
cmb69 merged 1 commit intophp:masterfrom
IMSoP:encoding-function-improvements
Apr 4, 2022
Merged

Improve documentation of string encoding conversion functions#1418
cmb69 merged 1 commit intophp:masterfrom
IMSoP:encoding-function-improvements

Conversation

@IMSoP
Copy link
Copy Markdown
Collaborator

@IMSoP IMSoP commented Feb 20, 2022

  • Move utf8_encode and utf8_decode into the strings chapter, since
    they were moved out of the XML extension in 7.2
  • Recommend mb_convert_encoding, iconv, and UConverter::transcode
    when mentioning encoding in passing
  • Document UConverter::transcode, based on examination of source
    and upstream ICU docs
  • Make the language used more consistent, e.g. "convert" rather
    than "encode"/"decode", "encoding" rather than "charset"

Copy link
Copy Markdown
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

Thank you very much!

@IMSoP IMSoP force-pushed the encoding-function-improvements branch 2 times, most recently from 7cd18b3 to 988d617 Compare March 20, 2022 16:01
Copy link
Copy Markdown
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

Besides some nits (mostly style related), this looks good to me.

Copy link
Copy Markdown
Collaborator Author

@IMSoP IMSoP left a comment

Choose a reason for hiding this comment

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

Thanks for the thorough review! I think I've caught all those bits now.

@IMSoP IMSoP force-pushed the encoding-function-improvements branch from 988d617 to 1db6af7 Compare April 3, 2022 21:52
- Move utf8_encode and utf8_decode into the strings chapter, since
  they were moved out of the XML extension in 7.2
- Recommend mb_convert_encoding, iconv, and UConverter::transcode
  when mentioning encoding in passing
- Document UConverter::transcode, based on examination of source
  and upstream ICU docs
- Make the language used more consistent, e.g. "convert" rather
  than "encode"/"decode", "encoding" rather than "charset"
@IMSoP
Copy link
Copy Markdown
Collaborator Author

IMSoP commented Apr 3, 2022

I've re-worded the "from_encoding" and "to_encoding" parameter descriptions after @Crell's comment on #1419 (which should have been here; my fault). They were unnecessarily wordy, and didn't capture the fact that you're telling the function what to assume the encoding was.

@cmb69 cmb69 merged commit 99d758b into php:master Apr 4, 2022
@cmb69
Copy link
Copy Markdown
Member

cmb69 commented Apr 4, 2022

Thank you very much!

tiffany-taylor pushed a commit to tiffany-taylor/doc-en that referenced this pull request Jan 16, 2023
- Move utf8_encode and utf8_decode into the strings chapter, since
  they were moved out of the XML extension in 7.2
- Recommend mb_convert_encoding, iconv, and UConverter::transcode
  when mentioning encoding in passing
- Document UConverter::transcode, based on examination of source
  and upstream ICU docs
- Make the language used more consistent, e.g. "convert" rather
  than "encode"/"decode", "encoding" rather than "charset"

Closes phpGH-1418.
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.

2 participants