[RFC] Deprecation and alternatives for utf8_encode and utf8_decode#1419
[RFC] Deprecation and alternatives for utf8_encode and utf8_decode#1419IMSoP wants to merge 2 commits intoencoding-function-improvementsfrom
Conversation
0f1766a to
b9534bd
Compare
- 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"
467041d to
3b98512
Compare
b9534bd to
5c06875
Compare
5c06875 to
dfd441b
Compare
3b98512 to
bb32cd2
Compare
| <listitem> | ||
| <para> | ||
|
|
||
| The encoding which <parameter>str</parameter> should be converted to. |
There was a problem hiding this comment.
| The encoding which <parameter>str</parameter> should be converted to. | |
| The encoding to which <parameter>str</parameter> should be converted. |
There was a problem hiding this comment.
Reading it back, all of these sentences were unnecessarily torturous. I've come up with a new wording across all three functions, which I think is less wordy and more precise.
There was a problem hiding this comment.
Actually, that's part of #1418 which has the changes which can land even if deprecation doesn't go ahead.
| <listitem> | ||
| <para> | ||
| The type of encoding that <parameter>string</parameter> is being converted to. | ||
| The encoding which <parameter>string</parameter> should be converted to. |
There was a problem hiding this comment.
| The encoding which <parameter>string</parameter> should be converted to. | |
| The encoding to which <parameter>string</parameter> should be converted. |
| </note> | ||
| </refsect1> | ||
|
|
||
| <refsect1 role="changelog"> |
There was a problem hiding this comment.
Should the deprecation be mentioned in the changelog, too?
There was a problem hiding this comment.
Yes, probably. Also, looks like I missed an attribute to make it list as deprecated in indexes.
| <note> | ||
| <para> | ||
| This function does not attempt to guess the current encoding of the provided | ||
| string, it assumes it is encoded as ISO-8859-1 (also known as "Latin 1") |
There was a problem hiding this comment.
| string, it assumes it is encoded as ISO-8859-1 (also known as "Latin 1") | |
| string. It assumes it is encoded as ISO-8859-1 (also known as "Latin 1") |
There was a problem hiding this comment.
I compromised and used a semi-colon 😜
|
Sorry, I've made a mess of this; my intention was to compare two branches, but I ended up with two copies of each branch, confusing everything. Re-opened here for now: IMSoP#1 |
Please see IMSoP#1 for current draft
See also #1418 for improvements which don't relate to the deprecation.