PostgreSQLMultibyte (MB) support is intended to allow PostgreSQL to handle multiple-byte character sets such as EUC (Extended Unix Code), Unicode, and Mule internal code. With MB enabled you can use multibyte character sets in regular expressions (regexp), LIKE, and some other functions. The default encoding system is selected while initializing your PostgreSQL installation using initdb. Note that this can be overridden when you create a database using createdb or by using the SQL command CREATE DATABASE. So you can have multiple databases each with a different encoding system. When no option is used the default encoding (SQL_ASCII) is used.compiling : ./configure --enable-multibyte[=encoding] set default encoding : initdb -E encoding using createdb : createdb -E encoding using CREATE DATABASE : CREATE DATABASE name WITH ENCODING=encoding Where encoding for Chinese can be EUC_CN, EUC_TW or UNICODE. The encoding for a database is represented as an encoding column in the pg_database system catalog. You can see that by using the -l option or the \l command of psql. PostgreSQL supports an automatic encoding conversion between server and client for some encodings. The conversion info is stored in pg_conversion system catalog. You can create a new conversion by using CREATE CONVERSION. PostgreSQL comes with some predefined conversions. For the server-encoding EUC_CN the following client encodings are available : EUC_CN, UNICODE, MULE_INTERNAL. For the server-encoding EUC_TW the following client encodings are available : EUC_TW, BIG5, UNICODE, MULE_INTERNAL For the server-encoding UNICODE the following client encodings are available : EUC_JP, SJIS, EUC_KR, UHC, JOHAB, EUC_CN, GBK, EUC_TW, BIG5, LATIN1 to LATIN10, ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8, WIN, ALT, KOI8, WIN1256, TCVN, WIN874, GB18030, WIN1250 To enable the automatic encoding translation, you have to tell PostgreSQL the encoding you would like to use in the client. There are several ways to accomplish this (see PostgreSQL-website for more information). link : Multibyte support. [ < back ] - [ home ] |
![]() |
Local links are in blue, links to other websites are in red, commands are in green. You need unicode fonts, a 4+ browser and acrobat reader to fully explore and enjoy this webpage. (if necessary you can download asian fontpacks for acrobat reader) Currently translating my thesis to English : more info |
|||
| © Seba - contact
at seba at ulyssis dot org
users online: 2
|
|||||