lib/net/ntlm/encode_util.rb in rubyntlm-0.6.4 vs lib/net/ntlm/encode_util.rb in rubyntlm-0.6.5

- old
+ new

@@ -37,10 +37,10 @@ # encodings. This library uses string contatination to build the packet bytes. The end result is that # you can either marshal the encodings elsewhere of simply know that each time you call encode_utf16le # the function will convert the string bytes to UTF-16LE and note the encoding as UTF-8 so that byte # concatination works seamlessly. def self.encode_utf16le(str) - str.dup.force_encoding('UTF-8').encode(Encoding::UTF_16LE, Encoding::UTF_8).force_encoding('UTF-8') + str.dup.force_encoding('UTF-8').encode(Encoding::UTF_16LE, Encoding::UTF_8).force_encoding('ASCII-8BIT') end end end end