mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
[DOC] Explain that transcoding to the same encoding just copies.
This is a reenstatement of the explanation in commit
463633e4a9
to partially
address Bug #19342.
This commit is contained in:
parent
468ce1488d
commit
11f28f3268
1 changed files with 6 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue