I did come up with one solution :
monkey patching String can force YAML to use \ escaping rather then binary and therefore return strings in the default encoding (UTF-8 for me) rather then ASCII-8BIT
class String
def is_binary_data?
encoding == Encoding::ASCII_8BIT unless empty?
end
end
originally this routine uses some heuristics around which would be shorter \ escaping of binary encoding of the string which is why only some of the international strings I had were having problems.
Tim Garnett
2010-09-02 20:42:07