We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7b796c commit 605945fCopy full SHA for 605945f
lib/net/ber/core_ext/string.rb
@@ -29,7 +29,8 @@ def raw_utf8_encoded
29
# Strings should be UTF-8 encoded according to LDAP.
30
# However, the BER code is not necessarily valid UTF-8
31
begin
32
- self.encode('UTF-8').force_encoding('ASCII-8BIT')
+ self.encode('UTF-8', :invalid => :replace, :undef => :replace,
33
+ :replace => '').force_encoding('ASCII-8BIT')
34
rescue Encoding::UndefinedConversionError
35
self
36
end
0 commit comments