Обсуждение: MULE_INTERNAL

Поиск
Список
Период
Сортировка

MULE_INTERNAL

От
PG Doc comments form
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/multibyte.html
Description:

The documentation says that UTF-8 can be converted to any encoding:

UTF8     all supported encodings

That's not true:

db => SET CLIENT_ENCODING TO 'MULE_INTERNAL';
ERROR:  invalid value for parameter "client_encoding": "MULE_INTERNAL"
DETAIL:  Conversion between MULE_INTERNAL and UTF8 is not supported.

Maybe MULE shouldn't be a supported encoding.

Re: MULE_INTERNAL

От
Tatsuo Ishii
Дата:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/11/multibyte.html
> Description:
> 
> The documentation says that UTF-8 can be converted to any encoding:
> 
> UTF8     all supported encodings
> 
> That's not true:
> 
> db => SET CLIENT_ENCODING TO 'MULE_INTERNAL';
> ERROR:  invalid value for parameter "client_encoding": "MULE_INTERNAL"
> DETAIL:  Conversion between MULE_INTERNAL and UTF8 is not supported.
> 
> Maybe MULE shouldn't be a supported encoding.

One of the advantages of using MULE_INTERNAL as a database encoding
is, it allows a round trip conversion between encodings, plus speed
(unlike to/from UTF-8 conversion no table lookup is involved with
MULE_INTERNAL.)

On the other hand, UTF-8 does not allow round trip encoding
conversions for some encodings, which means you may loose some
information in your text data when you store it into a database.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp