Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 87DE4F6332A; Thu, 19 Jul 2012 05:22:04 -0300 (ADT) Received: from mail-lb0-f174.google.com ([209.85.217.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Srlzn-0007JY-89; Thu, 19 Jul 2012 08:22:04 +0000 Received: by lbbgm6 with SMTP id gm6so3261756lbb.19 for ; Thu, 19 Jul 2012 01:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PqMh1Y40HyYzhCUZm4sporT9VgyJTv/bPgfiQSRq5W8=; b=Y2weoAZoLXEzj6z9RGCVHy9lXkDWlpchZpaX0MNqhRpr763AlHeto7iIt45rlj07B7 Lu7x3/fTNB1a6vhJ/NiIbUWCabBX3pTma45z78UUj9AXdxPN/1vrlSdhgXZc0LbFzse3 DppPSmUV5czBPQaxN82L3SgyOM9Lvvavk5ra5NvioMDUspKkILtAZrvFCoW2dow7Rit9 zj24xFXOhix3d9bpUnyE88TZxn+rwHEnVtpGIo6hJVOqOn3yZ1tMeZ35WZ+CBIzPvkRB tByS4kmm/OdY8qK+qAbLKKmPHZicU19I9P5D5Q0Lb52X+2NZjo9v/W5HVYiVrn6Wh+IO Qouw== Received: by 10.152.113.199 with SMTP id ja7mr1088204lab.10.1342686109500; Thu, 19 Jul 2012 01:21:49 -0700 (PDT) Received: from [1.0.0.7] ([94.138.26.200]) by mx.google.com with ESMTPS id gd9sm333056lbb.15.2012.07.19.01.21.46 (version=SSLv3 cipher=OTHER); Thu, 19 Jul 2012 01:21:48 -0700 (PDT) Message-ID: <5007C399.6000405@gmail.com> Date: Thu, 19 Jul 2012 12:21:45 +0400 From: Alexander Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Tatsuo Ishii CC: pgsql-general@postgresql.org, ringerc@ringerc.id.au, yi.codeplayer@gmail.com, pgsql-bugs@postgresql.org Subject: Re: main log encoding problem References: <5006D340.4000808@gmail.com> <20120719.081626.240539691760651172.t-ishii@sraoss.co.jp> <5007AB3D.3010501@gmail.com> <20120719.162426.57507866406108945.t-ishii@sraoss.co.jp> In-Reply-To: <20120719.162426.57507866406108945.t-ishii@sraoss.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201207/160 X-Sequence-Number: 33636 >> And regarding mule internal encoding - reading about Mule >> http://www.emacswiki.org/emacs/UnicodeEncoding I found: >> /In future (probably Emacs 22), Mule will use an internal encoding >> which is a UTF-8 encoding of a superset of Unicode. / >> So I still see UTF-8 as a common denominator for all the encodings. >> I am not aware of any characters absent in Unicode. Can you please >> provide some examples of these that can results in lossy conversion? > You can google by "encoding "EUC_JP" has no equivalent in "UTF8"" or > some such to find such an example. In this case PostgreSQL just throw > an error. For frontend/backend encoding conversion this is fine. But > what should we do for logs? Apparently we cannot throw an error here. > > "Unification" is another problem. Some kanji characters of CJK are > "unified" in Unicode. The idea of unification is, if kanji A in China, > B in Japan, C in Korea looks "similar" unify ABC to D. This is a great > space saving:-) The price of this is inablity of > round-trip-conversion. You can convert A, B or C to D, but you cannot > convert D to A/B/C. > > BTW, I'm not stick with mule-internal encoding. What we need here is a > "super" encoding which could include any existing encodings without > information loss. For this purpose, I think we can even invent a new > encoding(maybe something like very first prposal of ISO/IEC > 10646?). However, using UTF-8 for this purpose seems to be just a > disaster to me. > Ok, maybe the time of real universal encoding has not yet come. Then we maybe just should add a new parameter "log_encoding" (UTF-8 by default) to postgresql.conf. And to use this encoding consistently within logging_collector. If this encoding is not available then fall back to 7-bit ASCII.