Skip to content

Commit a8d0bbe

Browse files
author
Jason Franklin
committed
Catch Encoding::ConverterNotFoundError
Some binary format on Active Directory can raise "Encoding::ConverterNotFoundError". Signed-off-by: Jason Franklin <[email protected]>
1 parent 8a18267 commit a8d0bbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/net/ber/core_ext/string.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def raw_utf8_encoded
3232
self.encode('UTF-8').force_encoding('ASCII-8BIT')
3333
rescue Encoding::UndefinedConversionError
3434
self
35+
rescue Encoding::ConverterNotFoundError
36+
return self
3537
end
3638
else
3739
self

0 commit comments

Comments
 (0)