Hey Marco...
I got curious about your case.. and decided to run some tests..
conclusion: I don't face the issue you had.. here is what I did.
Create a non-unicode db2 db, using ANSI codeset 1252 (windows for brazil)
Table with a regular varchar column
In Df 20.. running this small code:
Code:
Procedure Test
String sValue
Open unansi
Move "‘O'Clock’" to sValue
Clear unansi
Move 1 to unansi.ID
Move sValue to unansi.ANSICOL
SaveRecord unansi
Showln unansi.ANSICOL
// 8216 is dec value for code-point U+2018 (hex)
// 8217 is dec value for code-point U+2019 (hex)
Move (Character(8216) + "O'Clock" + Character(8217)) to sValue
Clear unansi
Move 2 to unansi.ID
Move sValue to unansi.ANSICOL
SaveRecord unansi
Showln unansi.ANSICOL
End_Procedure
Send Test
Saves the left and right single cotes successfully on database. The converted char actually
U+2018 get's converted to ANSI-1252 x91 (hex) , 145 (dec) char
U+2019 get's converted to ANSI-1252 x92 (hex), 146(dec) char
The df output shows the value read from db, and the right window, shows what is actually saved in database
So, I guess you may be using a different scenario.. maybe your ANSI codepage does not have the left/right chars ?
Regards