Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNQmK-0002s9-E7 for pgsql-bugs@postgresql.org; Sun, 14 Oct 2012 16:11:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNQmE-0007Kq-VT for pgsql-bugs@postgresql.org; Sun, 14 Oct 2012 16:10:59 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q9EGAgrg026180; Sun, 14 Oct 2012 12:10:42 -0400 (EDT) From: Tom Lane To: Alexander Law cc: Noah Misch , Alvaro Herrera , Pg Bugs Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset In-reply-to: <507A5D18.3080107@gmail.com> References: <1331925178-sup-9261@alvh.no-ip.org> <4F65A533.7090208@gmail.com> <1332187409-sup-4631@alvh.no-ip.org> <4F68DF76.1030609@gmail.com> <20121010110555.GA21405@tornado.leadboat.com> <507A5D18.3080107@gmail.com> Comments: In-reply-to Alexander Law message dated "Sun, 14 Oct 2012 10:35:04 +0400" Date: Sun, 14 Oct 2012 12:10:42 -0400 Message-ID: <26179.1350231042@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201210/127 X-Sequence-Number: 34427 Alexander Law writes: > +#ifdef WIN32 > + termin = fopen("CONIN$", "r"); > + termout = fopen("CONOUT$", "w+"); > +#else > termin = fopen(DEVTTY, "r"); > termout = fopen(DEVTTY, "w"); > +#endif > if (!termin || !termout My immediate reaction to this patch is "that's a horrible kluge, why shouldn't we change the definition of DEVTTY instead?" Is there a similar issue in other places where we use DEVTTY? Also, why did you change the termout output mode, is that important or just randomness? regards, tom lane