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
Message from discussion What is the proper way to use Net::LDAP when sending UTF-8 strings
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
 
danabr  
View profile  
 More options May 21 2011, 5:08 am
From: danabr <hams...@gmail.com>
Date: Sat, 21 May 2011 02:08:52 -0700 (PDT)
Local: Sat, May 21 2011 5:08 am
Subject: What is the proper way to use Net::LDAP when sending UTF-8 strings

Hi,

When  I upgraded from Ruby 1.8.7 to 1.9.2 (and the latest version of
net-ldap) I faced a lot of encoding issues. First, I made sure all my
strings used the same encoding (UTF-8). However, sending UTF-8 encoded
strings to net-ldap caused crashes (about not being able to concatenate
UTF-8 and ASCII-BIT strings). I solved the problems by using  
force_encoding("ASCII-8BIT") on all input to net-ldap. As far as I have been
able to tell, the data seems to be correctly formated when I look in the
LDAP directory.

Now, is this hack the proper way to deal with non-ASCII data in net-ldap? I
thought LDAP v3 defaulted to UTF-8 strings, and that net-ldap would follow
that default. If this is the proper way to deal with this issue, why not add
the conversion to net-ldap itself, so users don't have to worry?

//Daniel Abrahamsson


 
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.