[DOC] Explain that transcoding to the same encoding just copies.

This is a reenstatement of the explanation in commit
463633e4a934a00f869086a6ffbf84c6cb8ad630 to partially
address Bug #19342.
This commit is contained in:
Martin Dürst 2023-01-16 16:25:04 +09:00
parent 468ce1488d
commit 11f28f3268

View File

@ -38,3 +38,9 @@ interprets +self+ using +src_encoding+, encodes the new string using +dst_encodi
Optional keyword arguments +enc_opts+ specify encoding options;
see {Encoding Options}[rdoc-ref:encodings.rdoc@Encoding+Options].
Please note that conversion from an encoding +enc+ to the same encoding
+enc+ (independent of whether +enc+ is given explicitly or implicitly)
is a no-op, i.e. the string is simply copied without any changes, and
no exceptions are raised, even if there are invalid bytes.