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 8a18267 commit 406c8b7Copy full SHA for 406c8b7
lib/net/ber/core_ext/string.rb
@@ -29,7 +29,7 @@ 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, replace: '' ).force_encoding('ASCII-8BIT')
33
rescue Encoding::UndefinedConversionError
34
self
35
end
0 commit comments