-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoding problems #31
base: master
Are you sure you want to change the base?
Conversation
I have same problem, with russian symbols. |
I change the default internal encoding because seed.inspect need to be properly encoded.
I change the default internal encoding because seed.inspect need to be properly encoded.
Thanks for the patch. Any chance you could rework the it to simply using Also, it needs to retain Ruby 1.8 compatibility. Cheers |
I've tried first to use What should be if not an option? It is not 1.8 compatible, why? Encoding is not there? then I should add a raise if option[:encoding] && Ruby.version < 1.9 ?? Thanks |
Yeah it looks like the I think we need our own version of def inspect_seed(seed)
"{" + seed.map { |k, v| "#{encode_string k}=>#{encode_string v}" }.join(', ') + "}"
end
def encode_string(s)
s.respond_to?(:encode) ? s.encode : s
end That will deal with ruby 1.8 compat too as the string won't respond to |
Isn't it more complicated than change internal_encoding? what is the The warning approach for ruby 1.8 seems simplier and easier to mantain. |
The reason I don't want to mess with |
I'm not sure if it is a problem or if i'm doing something bad.
I have a database with UTF-8 and I have simbols like á ñ ü and I'm ussing seed-fu:writer for write seed for this data.
when I try to use this seed I see that there are errors:
Is there something I can do?