lib/net/ber.rb in net-ldap-0.2.2 vs lib/net/ber.rb in net-ldap-0.3.0
- old
+ new
@@ -104,11 +104,11 @@
# <tr><th>CHARACTER STRING</th><th>C</th><td>29: 61 (0x3d, 0b00111101)</td></tr>
# <tr><th>BMPString</th><th>P</th><td>30: 30 (0x1e, 0b00011110)</td></tr>
# <tr><th>BMPString</th><th>C</th><td>30: 62 (0x3e, 0b00111110)</td></tr>
# </table>
module BER
- VERSION = '0.2.2'
+ VERSION = '0.3.0'
##
# Used for BER-encoding the length and content bytes of a Fixnum integer
# values.
MAX_FIXNUM_SIZE = 0.size
@@ -293,9 +293,11 @@
# A String object with a BER identifier attached.
class Net::BER::BerIdentifiedString < String
attr_accessor :ber_identifier
def initialize args
super args
+ # LDAP uses UTF-8 encoded strings
+ force_encoding('UTF-8') if respond_to?(:encoding)
end
end
module Net::BER
##