Subject | GB2312 (was Re: [Firebird-devel] v1.5 release... are we ready?) |
---|---|
Author | Peter Jacobi |
Post date | 2003-11-15T12:09:55Z |
Hi Lica,
(I've switched email accounts and do a CC to the support list,
to have this response in the archives)
sets with a varying amount of bytes/character). This is reported most
often when using UTF-8 (UNICODE_FSS), but it also applies to
GB_2312.
Firebird doesn't ennforce the character limit, only the maximum byte limit.
So, in VARCHAR(20) CHARACTER SET GB_2312, you can store
20 chinese characters or 40 ASCII characters or some mix of them.
This is of course not good, and you should enforce the correct
character limit in your front end application.
Regards,
Peter Jacobi
--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++
(I've switched email accounts and do a CC to the support list,
to have this response in the archives)
> you use the character set GB_2312, at FB Server, the VARCHAR(20) can save40
> char,but at MS-SQL Server VARCHAR(20)=20 CHAR,Why FB Server ????There is a know defect in Firebird, when using MBCS (= character
sets with a varying amount of bytes/character). This is reported most
often when using UTF-8 (UNICODE_FSS), but it also applies to
GB_2312.
Firebird doesn't ennforce the character limit, only the maximum byte limit.
So, in VARCHAR(20) CHARACTER SET GB_2312, you can store
20 chinese characters or 40 ASCII characters or some mix of them.
This is of course not good, and you should enforce the correct
character limit in your front end application.
Regards,
Peter Jacobi
--
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
Jetzt kostenlos anmelden unter http://www.gmx.net
+++ GMX - die erste Adresse für Mail, Message, More! +++