byoungs32

Unicode String Comparison

Discussion created by byoungs32 on Sep 15, 2011
Latest reply on Sep 19, 2011 by bposthumus
I am building a Python script that searches for values within feature classes of an SDE database. The search criteria is based on a user provided string. In the database, the values are stored as unicode.

When I do a comparison of the user provided string and the the unicode value in the database table, I want to ensure that I account for unicode conversion and case sensititivity. What I have been doing is converting the user provided string to unicode, and then comparing that with the unicode value in SDE.

What I would like is to do the comparison of the two strings having them both upper case and unicode to avoid any problems with the comparison.

I know I can take the user provided string and use the .upper method and then convert it to unicode, but is there a way to take an existing unicode value and make it upper case?

Thanks in advance.

Outcomes