I’m looking for a suggestion on how to store and search for names like “O’Brian.” I’m having trouble with users entering names using straight or curly single-quote apostrophes, and then when searching, you don’t know which they used.
I could standardize the name to straight (or curly), but then I’d be changing how a user’s name is displayed. Maybe this isn’t a big deal, but a lot of users have put their names in with curly quotes. On a Windows machine, I don’t even know how they managed that.
I can come up with solutions but they’re either clunky or change user data. I’m hoping someone has a real-world suggestion to this issue.
When saving data to the database, you can replace all quotes with 1 option that suits you using the replace function. As a result, you will have all the names in one format. The same method can be used for searching, when entering a name, use the replace function to replace all quotes with 1 option that suits you. If this method does not fit you, write the steps with the expected result so that we understand your problem in detail and can help you.
I was thinking the same thing, but it is changing the display of someone’s name. They put in a curly quote, and they get a straight quote in the display, which feels a little weird.
I broke out the update into two steps. I wish everything didn’t require so much thinking. Being able to write a simple SQL statement would be very welcome for updates like this.