Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #7446

Ruby 2.7 and earlier (Pre-Ruby 3000/Ruby 3.0) Text Encoding / Charsets / Character Sets

From awefawefawefawef@prodigy.net
Newsgroups comp.lang.ruby
Subject Ruby 2.7 and earlier (Pre-Ruby 3000/Ruby 3.0) Text Encoding / Charsets / Character Sets
Date 2021-10-07 09:36 -0700
Organization Aioe.org NNTP Server
Message-ID <sjn7li$10ps$2@gioia.aioe.org> (permalink)

Show all headers | View raw


Hello,

In ruby versions earlier than Ruby 3.0 / Ruby 3000, was there a standard 
text encoding or was it per-platform?  Here is an example from Windows 
running Ruby 2.6.8 without the RUBYOPT=Eutf-8 option shows the following:

irb(main):001:0> 'hi'.encoding
=> #<Encoding:IBM437>
irb(main):002:0> RUBY_VERSION
=> "2.6.8"

Running the same commands in irb on Slackware Linux 14.2 without UTF-8 
enabled gives the following result:

irb(main):001:0> 'hi'.encoding
=> #<Encoding:ISO-8859-1>
irb(main):002:0> RUBY_VERSION
=> "2.2.5"

Thanks.

Back to comp.lang.ruby | Previous | Next | Find similar


Thread

Ruby 2.7 and earlier (Pre-Ruby 3000/Ruby 3.0) Text Encoding / Charsets / Character Sets awefawefawefawef@prodigy.net - 2021-10-07 09:36 -0700

csiph-web