impress/lib/utf8.rb

14 lines
260 B
Ruby
Raw Normal View History

2011-06-04 15:40:15 -07:00
if String.method_defined?(:force_encoding)
# UTF-8 support is native, so let's route the +"abc" syntax to the native
# encode method.
class String
def +@
dup.force_encoding('utf-8')
2011-06-04 15:40:15 -07:00
end
end
else
require 'encoding/character/utf-8'
end