X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 40F07D1B85F for ; Wed, 28 Jan 2004 02:19:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 68991-07 for ; Tue, 27 Jan 2004 22:18:56 -0400 (AST) Received: from millenium.mst.co.jp (unknown [210.230.185.241]) by svr1.postgresql.org (Postfix) with ESMTP id 70BEAD1B4AA for ; Tue, 27 Jan 2004 22:18:53 -0400 (AST) Received: from mst1x5r347kymb (lc12114 [192.168.1.114]) by millenium.mst.co.jp (8.11.6p2/3.7W) with SMTP id i0S2IpY04485 for ; Wed, 28 Jan 2004 11:18:51 +0900 Message-ID: <003501c3e545$13858f10$7201a8c0@mst1x5r347kymb> From: "Iain" To: Subject: Encoding and multibye support Date: Wed, 28 Jan 2004 11:18:53 +0900 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0031_01C3E590.8319BFE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.8 tagged_above=0.0 required=5.0 tests=HTML_20_30, HTML_FONT_FACE_ODD X-Spam-Level: * X-Archive-Number: 200401/38 X-Sequence-Number: 2254 This is a multi-part message in MIME format. ------=_NextPart_000_0031_01C3E590.8319BFE0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Hi All, I recently had a sight problem with a development database because I used the default encoding of SQL_ASCII. When I tried to load the database into a EUC_JP database of course there were some problems with invlaid EUC_JP characters. Fortunately they were easy to find and fix. Anyway, my search on "encoding" or "multibyte" showed up nothing in the 7.4 documentation. Eventually I found a page written by Tatsuo Ishii in the 7.2 documentation. I think that it's an important area, and is a potential trap for new players so I'd like to see the documentation updated. The following came out of a discussion with Tom Lane. I submitted it as comment in the interactive documentation. I think it would be a good idea to check the details and update the doc: ------ The default encoding SQL_ASCII effectively disables any encoding conversion. This means that your db will accept any kind of data. It's a potential problem as you may end up wth different kinds of encoding being used in both your data and metadata. It would seem that unless you specifically require to store data in various encodings then you should select a specific encoding when creating a new database. Use initdb -E to set the default for all new DBs. This can be overridden when using creating a new DB ------ Also, the documentation for installation (chapter 14), creating database clusters (16.2) and creating databases (18.2) doesn't mention encoding at all. Maybe they should. Also 16.2 should link to the documention for initdb (Server Applications, section III). I think that wuld be a good idea. regards Iain ------=_NextPart_000_0031_01C3E590.8319BFE0 Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable
Hi All,
 
I recently had a sight problem wi= th a=20 development database because I used the default encoding of SQL_ASCII. When= I=20 tried to load the database into a EUC_JP database of course there were some= =20 problems with invlaid EUC_JP characters. Fortunately they were easy to find= and=20 fix.
 
Anyway, my search on "encoding" o= r=20 "multibyte" showed up nothing in the 7.4 documentation. Eventually I f= ound=20 a page written by Tatsuo Ishii in the 7.2 documentation.
 
I think that it's an important ar= ea, and=20 is a potential trap for new players so I'd like to see the documentation=20 updated.
The following came out of a discu= ssion=20 with Tom Lane. I submitted it as comment in the interactive documentation. = I=20 think it would be a good idea to check the details and update the=20 doc:
------
The default encoding SQL_ASCII ef= fectively=20 disables any encoding conversion. This means that your db will accept any k= ind=20 of data. It's a potential problem as you may end up wth different kinds of= =20 encoding being used in both your data and metadata.
 
It would seem that unless you spe= cifically=20 require to store data in various encodings then you should select a=20 specific encoding when creating a new database. Use initdb -E to set t= he=20 default for all new DBs. This can be overridden when using creating a new= =20 DB
------
 
Also, the documentation for insta= llation=20 (chapter 14), creating database clusters (16.2) and creating databases= =20 (18.2) doesn't mention encoding at all. Maybe they should. Also 16.2= =20 should link to the documention for initdb (Server Applications, sectio= n=20 III). I think that wuld be a good idea.
 
regards
Iain
------=_NextPart_000_0031_01C3E590.8319BFE0--