Subject Re: [firebird-support] Character set not preserved in view columns
Author Ivan Prenosil
> i am using FB 1.5.2.4731 SS (although the same happens with embedded)
> and i have the following problem:
> when i generate the view with a column which concatenates varchar
> columns from a table, the character set is not preserved. i am aware
> that it makes sense that FB will not guess the character set, but i
> don't know if this can be specified in some way.
>
> Example:
>
> SET SQL DIALECT 3;
> SET NAMES WIN1250;
> DEFAULT CHARACTER SET WIN1250;
>
> CREATE TABLE CUSTOMER (
> FIRST_NAME VARCHAR(128) CHARACTER SET WIN1250,
> LAST_NAME VARCHAR(128) CHARACTER SET WIN1250
> );
>
> CREATE VIEW V_CUSTOMERS(FULL_NAME)
> AS select c.first_name || ' ' || c.last_name
> from customer c;
>
> although first_name and last_name in CUSTOMER have win1250 character
> set specified, full_name in V_CUSTOMERS doesn't.

I tried your example with FB1.5.3 and full_name was in win1250 character set.
In FB2 the rules are changed - everything will be returned in connection
character set (unles it is NONE).

Ivan
http://www.volny.cz/iprenosil/interbase/