Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> VARCHAR: characters or bytes?
When you define a field as a varchar(24), does that give it room for up to 24 bytes of text data, or does it give it room for up to 24 characters of data? After all, not all encodings are single-byte.
In particular, we're thinking of using a UTF-8 (Unicode) database to hold global customer data. We're converting the data from a previous, non-Unicode encoding. (Actually several databases, and several different encodings.) We don't want the data to overflow the field when converted, nor do we want the new field to be too narrow for new data. If a column has type varchar with a width of 24 and we convert it to UTF-8 using the same schema, that would only be enough room for about eight Japanese kanji in UTF-8 if varchar is measured in bytes, but it would be plenty if 24 referred to characters instead of bytes. Does anybody know for sure which it is? I've heard lots of opinions, but nobody seems to really know.
Thanks. Received on Tue May 02 2000 - 00:00:00 CDT