external_encoding

ARGF.external_encoding â encoding
Instance Public methods
1
2
3
4
5
6
Returns the external encoding for files read from +ARGF+ as an +Encoding+
object. The external encoding is the encoding of the text as stored in a
file. Contrast with +ARGF.internal_encoding+, which is the encoding used
to represent this text within Ruby.
 
To set the external encoding use +ARGF.set_encoding+.

For example:

1
ARGF.external_encoding  #=>  #<Encoding:UTF-8>
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.