From: <And...@Be...> - 2001-11-20 20:07:34
|
.. yes it does. So I learn OI rules now... ;-) later, Andreas -----Original Message----- From: Chris Winters To: ope...@li... Sent: 20.11.01 19:44 Subject: Re: [Openinteract-dev] Umlaut characters with LDAP * Andreas Nolte (And...@Be...) [011120 12:40]: > Hey! > > one small problem we have with SPOPS::LDAP is, that character values are not > converted from UTF8 unicode, which LDAP uses to ASCII and viceversa. English > writing people do not recognize this, but e.g. we Germans see funny > characters. > > Anyway: the conversion is actually easily achieved: > > use utf8; # somewhere > > and to this transform when reading from LDAP > $thevalue =~ tr/\0-\x{FF}//UC; > > and this when writing to LDAP or before sending passwords out to check. > > $thevalue =~ tr/\0-\xFF//CU; > > Now the question: where should these transform be made in a "good world" ;-) > ? In SPOPS::LDAP ? Good question. My knowledge of these sorts of things (unicode, utf8, etc.) can fill a thimble. Are there any penalties for 'use utf8'? Would we want to make this an option for people that particular fields need to be transformed in the method that you described? This would be fairly easy to implement -- in fact, maybe what we can do is create SPOPS rules for doing this. So you'd specify in your object configuration the fields that need to be converted and we'd have a post-fetch that would do the first conversion and a pre-save that would do the second. (Password checks and other custom usages would need to call a method to do the conversion.) Does that sound reasonable? Chris _______________________________________________ openinteract-dev mailing list ope...@li... https://lists.sourceforge.net/lists/listinfo/openinteract-dev |