Hi All,
Hoping someone can help me with this...
Our Appeon Mobile App is being used by over 100 users within a global organisation. All users are using iOS devices.
Within the app we provide the ability for users to search records based on Name. In some cases the names will contain apostrophes, or single quote. In or SQL Query we simply escaped the apostrophe with a second apostrophe, which works fine on Android and had been working on iOS, until iOS 11!
Sample of Code used to escape the apostrophe for SQL Filtering:
ls_value = ln_stringclass.replaceall(ls_value,"'","''")
ls_filter_horse_name = " AND HorseName LIKE '%" + ls_value + "%'"
It has been flagged by users that their searches are no longer working on iOS when including an apostrophe in their search string. This seemingly is a result of Apple changing the character used for the apostrophe to a curly single quote to be more aesthetically pleasing!
This feature can be turned off in the keyboard settings on the iOS device (Smart Punctuation), but is not exactly the easiest thing to do with upward of 100 users, many of whom have multiple devices.
Does anyone know how I can trap the curly quote code to replace it with an escaped apostrophe similar to my code above?
Thanks
Michael
What I would do is type in "A'", so the second character is a single quote and then in your code do something like #
Messagebox("second character value", string( Asc( Mid( ls_value, 2, 1) ) ) )
That way it'll show you which character you get exactly on IOS. (which you can replace in your strings using "Char(#)"
# being the code returned by Asc().
For some reason the Char(#) does not work as PB Asc value returns an integer value that does not match.
I have managed to get this working, by writing the value to the DB and retrieving it from there into a string variable for comparison. This seems to work!
Michael