Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ruby-ldap/ruby-net-ldap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: wandns/ruby-net-ldap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jul 30, 2013

  1. Don't change the encoding of binary data to UTF-8.

    It does not make sense to change the encoding of binary data, i.e., data that
    already has the encoding of ASCII-8BIT or BINARY. Data stored in the jpegPhoto
    attribute is an example.
    
    irb(main):001:0> binstring = ['FFD8FFE000104A46494600'].pack('H*')
    => "\xFF\xD8\xFF\xE0\x00\x10JFIF\x00"
    irb(main):002:0> binstring.encoding
    => #<Encoding:ASCII-8BIT>
    irb(main):003:0> binstring.respond_to?(:encode)
    => true
    irb(main):004:0> binstring.encode('UTF-8')
    Encoding::UndefinedConversionError: "\xFF" from ASCII-8BIT to UTF-8
            from (irb):4:in `encode'
            from (irb):4
            from /usr/bin/irb:12:in `<main>'
    irb(main):005:0>
    wandns committed Jul 30, 2013
    Configuration menu
    Copy the full SHA
    ca5d415 View commit details
    Browse the repository at this point in the history
Loading