Closed mahlonsmith closed 11 years ago
Hello @mahlonsmith, sorry that it took me so long to respond, but how did you tested regex?
I see that it works correctly in version 1.8.6 and 1.8.7 but do not work in 1.9.1, 1.9.3 and 2.0.0
1.9.3p429 :001 > require 'ldap'
=> true
1.9.3p429 :002 > require 'ldap/ldif'
=> true
1.9.3p429 :003 > LDAP::LDIF.parse_file('./test/data/ldif8.txt')
ArgumentError: invalid byte sequence in UTF-8
from /home/user/.rvm/gems/ruby-1.9.3-p429/gems/ruby-ldap-0.9.12/lib/ldap/ldif.rb:107:in `unsafe_char?'
from /home/user/.rvm/gems/ruby-1.9.3-p429/gems/ruby-ldap-0.9.12/lib/ldap/ldif.rb:324:in `block in parse_entry'
from /home/user/.rvm/gems/ruby-1.9.3-p429/gems/ruby-ldap-0.9.12/lib/ldap/ldif.rb:186:in `each'
from /home/user/.rvm/gems/ruby-1.9.3-p429/gems/ruby-ldap-0.9.12/lib/ldap/ldif.rb:186:in `parse_entry'
from /home/user/.rvm/gems/ruby-1.9.3-p429/gems/ruby-ldap-0.9.12/lib/ldap/ldif.rb:478:in `block in parse_file'
from /home/user/.rvm/gems/ruby-1.9.3-p429/gems/ruby-ldap-0.9.12/lib/ldap/ldif.rb:436:in `open'
from /home/user/.rvm/gems/ruby-1.9.3-p429/gems/ruby-ldap-0.9.12/lib/ldap/ldif.rb:436:in `parse_file'
from (irb):3
from /home/user/.rvm/rubies/ruby-1.9.3-p429/bin/irb:16:in `<main>'
Closing this in favor of #18
You can't require 'ldap/ldif' at all in ruby 2.0 due to an invalid multibyte range.
Possible alternatives: