Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Encoding::UndefinedConversionE rror
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ajedi32  
View profile  
 More options Jul 19 2012, 4:54 pm
From: Ajedi32 <andrewm....@gmail.com>
Date: Thu, 19 Jul 2012 13:54:17 -0700 (PDT)
Local: Thurs, Jul 19 2012 4:54 pm
Subject: Encoding::UndefinedConversionError

I recently started trying to implement a LDAP-based login system in my
Rails application, but whenever I try to run a basic LDAP query I get the
following error:

Encoding::UndefinedConversionError: "\x82" from ASCII-8BIT to UTF-8

It seems to be triggered whenever net-ldap hits a certain record in the
ldap database (though I can't really tell which one). Here's the code I'm
running that triggers the error. It always gets to a certain point and then
errors out:

    test = LDAP.search(

>       base: BASE_ROOT, # This is defined elsewhere in my code.
>       attributes: ["mail"],
>       filter: Net::LDAP::Filter.eq("objectClass", "person"),
>       return_result: true,
>       size:300
>     ) do |entry|
>       puts "DN: #{entry.dn}"
>       entry.each do |attribute, values|
>         puts "   #{attribute}:"
>         values.each do |value|
>           puts "      --->#{value}"
>         end
>       end
>     end

Is this a bug? Or is there something I'm doing wrong?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ajedi32  
View profile  
 More options Jul 20 2012, 11:21 am
From: Ajedi32 <andrewm....@gmail.com>
Date: Fri, 20 Jul 2012 08:21:57 -0700 (PDT)
Local: Fri, Jul 20 2012 11:21 am
Subject: Re: Encoding::UndefinedConversionError

I figured out how to solve the problem, this is indeed a bug:
https://github.com/ruby-ldap/ruby-net-ldap/pull/44

I'll be using krogebry <https://github.com/krogebry>'s branch of net-ldap
until this problem is fixed.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
krogebry  
View profile  
 More options Jul 20 2012, 1:32 pm
From: krogebry <bryan.kro...@gmail.com>
Date: Fri, 20 Jul 2012 10:32:28 -0700 (PDT)
Local: Fri, Jul 20 2012 1:32 pm
Subject: Re: Encoding::UndefinedConversionError

Glad I could help!

I tracked this down to ( I think ) some Microsoft specific garbage in one of the returned fields.

Now I'm trying to figure out how to get my patch rolled into the next rev.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »