Closed aiche closed 6 years ago
I'm not super keen on forcing one encoding over the top of another when we have no knowledge or control over the source string — it's not ours. This sounds like a problem well above rspec_junit_formatter and should probably be fixed at the source.
Can you provide an example spec which fails in rspec_junit_formatter and succeeds after this change?
I will try to come up with a minimal example to reproduce the issue. Hope I will find some time over the weekend.
I could finally identify the part of my setup that messes with the string encoding (for anyone interested net/ssh
fails to properly encode unicode messages that are sent via stdout from a remote machine). I will close this PR again.
Glad you got it sorted out, @aiche! 🙌
After upgrading from v0.3.0 to v0.4.1 we experienced issues when using
rspec_junit_formatter
together withserverspec
. Text that was originally encoded in UTF-8 was treated as ASCII and when trying to be encoded in UTF-8 as part of theescape
method gave the following errorAfter a bit of research I stumbled on the following issue JoshCheek/seeing_is_believing#46. While the root cause is different, the
#force_encoding
solved my issue, since I so far couldn't determine the exact point in my setup were the encoding was messed up.I'm not 100% sure if this should be included here, but it solved our issue so I wanted to at least share it.