Depending on when and where I check, the single quote character comes up under various codes, all from the same typed source (within Calc itself).
In the attached ODS the ’ in cell A1 is seen as 145 to CODE() but as 8216 to BASIC ASC() if RIGHT() is applied, but just as 39 to both if the same character starts the string and no RIGHT() is applied.
I can see that some conversion would take place for RIGHT() since it now has to count/locate individual characters. But why the conversion to 145 or 8216 at all in Tests #3 and #7 where there is no closing quote? I was thinking that 39 (Edit–Hexa–Decimal 27) was valid UTF8/16 just as apostrophe.
Character Code Conversion.ods (13.5 KB)