If you're fluent in Unicode ( I'm not :) there's NCHAR string variables and the UNISTR function. BEGIN DECLARE s NCHAR ( 1 ); SET s = UNISTR ( '\u03B4' ); SELECT s; END; s 'δ' Note that ISQL and this website displays the delta character as a delta character, but my favorite text editor does not... it displays delta as a question mark... so you can't always trust what your GUI shows you. answered 16 Jun '20, 14:08 Breck Carter |
So what codepage does your database use?
Is "codepage" still a thing in SQL Anywhere?
Is that a hint at the suble differences between character sets, encodings, code pages and collations (which I tend to mix up...)?
FWIW, I don't know whether all other customers do generelly use NCHAR instead of CHAR or UTF-8 as CHAR collation but we still prefer "1252LATIN1" when i18n does not matter, as that fits our local needs...
And of course there are single-byte codepages that contain Greek symbols - I'm not sure whether the OP asks for "how to code that character" vs. "how can it be stored" in the database.
> Is that a hint at the suble differences
Oh, gosh, you must have me confused with someone who understands character sets more complex than eight-bit-EBCDIC... there, that should date me :)
> I'm not sure whether the OP asks for "how to code that character" vs. "how can it be stored" in the database.
The question asked "how to insert the greek symbol "δ" into a table" so I think it's the latter: "how can it be stored" in the database
OK, so you asked for John?
...which makes me ask: What codepage/charset/collation does the database use? :)