in reply to Re^3: Help needed to compare two unicode strings!!!
in thread Help needed to compare two unicode strings!!!

Thanks for your opinion.
I agree with you that canonical equivalancy is the basic equivalancy and most likely suitable for application. But if I want to build an application which will verify the user credentials against the credentials stroed in a directory server (say LDAP), in that case I need to compare two strings, one supplied by the user and one stored in the directory. The sting stored in the directory server supplied by an administrator of the application software. In case of string stored in the directory server is the UTF-8 string and the UTF-8 encoding has done on the string supplied by the administrator. This string stored in the directory server remains constant for every time I fetch from directory server. But credentials supplied by the user may vary. Some time user can choose one format and other time another format. Take the Katakana example which I have mentioned in my previous post.
Administrator supplied the user credentials in katakana half width format and user supplied the same thing in katakana full width format.
If I comapre these two strings in canonical equivalancy then these two strings are different and the application will fail to identify the user. I think this is an error. Can you please tell me in this case what shall I do, stick to canonical equivalancy or shall I check compatibility equivalancy as well?
TIA.
-Pijush
  • Comment on Re^4: Help needed to compare two unicode strings!!!