In ruby 1.9.3-p484 I have to construct an SMPP package, but when I pass the constructed packet's content in string to the method that delivers it, a strange \xC2 value appears in the content. Having investigated the issue, I found the following interesting gotcha:
"\u008E".force_encoding("BINARY")
=> "\xC2\x8E"
Why does \u00BE become \xC2\8E when I want to use binary encoding? Why not \x00\x8E?