Subject | Re: [firebird-support] Connection charset UTF8, column charset ASCII: right padded char fields |
---|---|
Author | Dmitry Yemanov |
Post date | 2008-12-09T13:18:51Z |
skoczian wrote:
when stored inside the database (although compressed).
Dmitry
>It's not related to charsets. CHAR values are always space-padded, even
> I've seen the discussion about right padded char(n) fields sent from
> the Firebird server if the field has character set UTF8. But even if
> a char column with fixed length is declared with character set ASCII
> the clients I've used seem to pad it with blanks, if the connection
> character set is UTF8. Is that right? I could understand it for
> columns declared as, say, ISO8859_1, because transliteration to UTF8
> might need more bytes. But that can't happen with an ASCII column,
> so why those blanks?
when stored inside the database (although compressed).
> Even with "SELECT TRIM(TRAILING FROM asciifield) FROM mytable" thisOf course, because the result is also CHAR.
> happens.
> It doesn't happen with "SELECT asciifield || '' FROMBecause concatenation results in a VARCHAR instead.
> mytable" which might serve as ugly workaround, but again: why?
Dmitry