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
Written by Melanie Archer
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#