Last Updated: February 25, 2016
·
375
· mejarc

Default string encoding

In Ruby, will be 'US-ASCII'...

"foobar".encoding

...unless one has a comment on the script file's first line specifying otherwise:

# encoding: utf-8

"foobar".encoding  #UTF-8