Does anyone know how to insert the greek symbol "δ" into a table?

asked 16 Jun, 13:36

stetteh's gravatar image

stetteh
263
accept rate: 0%

So what codepage does your database use?

(16 Jun, 16:59) Volker Barth
Replies hidden

Is "codepage" still a thing in SQL Anywhere?

(17 Jun, 07:39) Breck Carter

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.

(17 Jun, 08:20) Volker Barth

> 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

(17 Jun, 08:51) Breck Carter

someone who understands character sets

OK, so you asked for John?

"how can it be stored" in the database

...which makes me ask: What codepage/charset/collation does the database use? :)

(17 Jun, 08:58) Volker Barth

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.

permanent link

answered 16 Jun, 14:08

Breck%20Carter's gravatar image

Breck Carter
30.5k493674986
accept rate: 20%

edited 16 Jun, 14:12

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×29

question asked: 16 Jun, 13:36

question was seen: 81 times

last updated: 17 Jun, 08:58