Encoding.default_internal = Encoding.default_external = 'utf-8' "föö".match(/(\w+)/u)[1] == "föö" # => false
# encoding=utf-8 p "föö".match(/\p{Word}+/)[0] == "föö"