I write a little ruby script, which sends me an email when a new commit added to our svn.
I get the log with this code:
log = `/usr/bin/svnlook log #{ARGV[0]}`
When I run my script from bash I get good encoded character in the email, but when I try it and create a new commit I get wrong hungarian characters.
I commited this:
tes
őéá
I get this in the email:
Log: tes
?\197?\145?\195?\169?\195?\161
How can I solve this issue?
Yes, Ruby is in the process of supporting Unicode (differently). The libraries are in flux, catching up with Ruby 1.9.
To track down your bug, you need to figure out what is different between your two cases. Maybe when your commit hook gets run, it has a different path, and therefore different Ruby? Is it the same machine? Is it the same email client? It could be at several different levels all the way from the interpreter that reads the email template to different clients reading the email. You have any more info?