Re: encoding names v2.
| От | Karel Zak |
|---|---|
| Тема | Re: encoding names v2. |
| Дата | |
| Msg-id | 20010823095114.B7892@zf.jcu.cz обсуждение исходный текст |
| Ответ на | Re: encoding names v2. (Peter Eisentraut <peter_e@gmx.net>) |
| Список | pgsql-patches |
On Wed, Aug 22, 2001 at 09:38:03PM +0200, Peter Eisentraut wrote:
> Okay, here is some bad news: I just looked into the SQL99 standard for
> the names of predefined character set names, and here is the list:
>
> SQL_CHARACTER
> GRAPHIC_IRV or ASCII_GRAPHIC
> LATIN1 <==== !!!
> ISO8BIT or ASCII_FULL
> UTF16
> UTF8
> UCS2
> SQL_TEXT
> SQL_IDENTIFIER
>
> So perhaps we should keep the LATIN1 thing after all? I don't like it,
> but the rules...
>
> Comments?
Oh man... what do you want to hear? :-(
Here is ***no problem*** add arbitrary alias (for example LATIN1 is still
correct name for our code), but a question is how names select as primary
and use it as output for user eyes. I'm really unsure if we must
blindly support SQL99 if this standard *ignore* in some rules other
standards and conventions. We can support SQL99's ignoran names for example
in pg_char_to_encoding(), but we needn't show these names to users (for
example in psql's \l command).
> > - getdatabaseencoding() is compatible with old versions, but
> > in the code is commented as deprecated.
> >
> > - getdbencoding() is new function that return correct encoding names
>
> See my other message about this. I don't think this is a good choice of
> names.
OK.
> This is okay, look at the list above for precedent.
>
> > - the ./configure.in:
> > * use new encoding names too for --enable-multibyte
> > * define MULTIBYTE that handle default encoding id
>
> Where is this needed?
In "mb/mbutils.c" was/is set default database encoding by encoding id
(maybe it's never used, because standard backend init encoding during
start, but old code used it and I keep it).
>
> > * define MULTIBYTE_NAME that handle default encoding name (neeful
> > for initdb)
>
> Can you rename this to something like DEFAULT_CHARACTER_SET? There is
> really nothing "multibyte" here.
Good point.
> > src/utils/mb/Unicode/KOI8_to_utf8.map --> src/utils/mb/Unicode/KOI8R_to_utf8.map
> > src/utils/mb/Unicode/WIN_to_utf8.map --> src/utils/mb/Unicode/WIN1251_to_utf8.map
> > src/utils/mb/Unicode/utf8_to_KOI8.map --> src/utils/mb/Unicode/utf8_to_KOI8R.map
> > src/utils/mb/Unicode/utf8_to_WIN.map --> src/utils/mb/Unicode/utf8_to_WIN1251.map
>
> Can you introduce some uniform capitalization (e.g., all lower case)?
OK.
> Don't worry, we'll get there. ;-)
I'm still happy :-)
Karel
--
Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
В списке pgsql-patches по дате отправления: