Subject | Re: [firebird-support] Re: SELECT distinct with f_GenerateSndxIndex from FreeUDFLib fails |
---|---|
Author | Michael Ludwig |
Post date | 2012-06-01T17:39:19Z |
dancooperstock schrieb am 01.06.2012 um 16:27 (-0000):
SQL> show table z;
A VARCHAR(20) CHARACTER SET UTF8 Nullable
SQL> insert into z values ('Übel');
Statement failed, SQLSTATE = 22000
Malformed string
SQL> insert into z values (_win1252'Übel');
SQL> commit;
SQL> -- all characters in good shape
That's an ad-hoc conversion of literals.
Also, if in isql, consider using an option such as -ch win1252 to
specify a character set your UDF can live with. Same for programmatic
access. For truly multi-alphabet data like Greek and Russian together
in one column you need Unicode, of course.
Michael
> I can force the error with just this SQL:Would using an introducer help? Along the lines of:
>
> SELECT f_GenerateSndxIndex('ÉLISE') FROM rdb$database
SQL> show table z;
A VARCHAR(20) CHARACTER SET UTF8 Nullable
SQL> insert into z values ('Übel');
Statement failed, SQLSTATE = 22000
Malformed string
SQL> insert into z values (_win1252'Übel');
SQL> commit;
SQL> -- all characters in good shape
That's an ad-hoc conversion of literals.
Also, if in isql, consider using an option such as -ch win1252 to
specify a character set your UDF can live with. Same for programmatic
access. For truly multi-alphabet data like Greek and Russian together
in one column you need Unicode, of course.
Michael