Xojo2023r4: apostrophe looks different after saving in Postgres

This web app is using Postgres SQL database for storing data. I see following difference:

The regular single tik (apostrophe) entered into the text field looks as expected but after saving in database viewing again it looks more like a back tik. Is this normal?
Can anyone confirm please?

My best guess:

Somewhere in your code you are attempting to protect against SQL injection manually instead of using a Prepared Statement, and that function is swapping apostrophes with backticks.

Replace that code with a Prepared Statement and this problem will go away.

2 Likes

Kem, I don’t see anything substituting tik with back tik in the code. More importantly, it always appears on the screen as back tik regardless if it is stored as tik or back tik in the database.

Kem can only guess without seeing some code.
I have never seen this type of substitution maybe an encode difference or some locale effect? For this we will need more information about your code, your Postrgres configuration, etc.

1 Like

Check if you have “smart quotes” switched on in System Preferences/System Settings.

I don’t have “smart quotes and dashes” turned on.
I am still looking into this but if somebody using Postgres and Xojo could verify that there is or not a problem - I would appreciate. Thanks.

We use postgres and Xojo and this is not a problem for us.

Have you looked at your database record and see if it looks like ' or `?