Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 8842 invoked from network); 13 Apr 2010 17:00:53 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Apr 2010 17:00:53 -0000 Received: (qmail 80046 invoked by uid 500); 13 Apr 2010 17:00:53 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 79982 invoked by uid 500); 13 Apr 2010 17:00:52 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 79975 invoked by uid 99); 13 Apr 2010 17:00:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Apr 2010 17:00:52 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.218.216] (HELO mail-bw0-f216.google.com) (209.85.218.216) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Apr 2010 17:00:45 +0000 Received: by bwz8 with SMTP id 8so4471333bwz.3 for ; Tue, 13 Apr 2010 10:00:22 -0700 (PDT) Received: by 10.223.62.207 with SMTP id y15mr3391413fah.92.1271178012459; Tue, 13 Apr 2010 10:00:12 -0700 (PDT) Received: from zulu.e-reka.si (cpe-85-10-46-51.dynamic.amis.net [85.10.46.51]) by mx.google.com with ESMTPS id 22sm11445338fkq.17.2010.04.13.10.00.10 (version=SSLv3 cipher=RC4-MD5); Tue, 13 Apr 2010 10:00:11 -0700 (PDT) Message-ID: <4BC4A319.8010407@xbc.nu> Date: Tue, 13 Apr 2010 19:00:09 +0200 From: =?UTF-8?B?QnJhbmtvIMSMaWJlag==?= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: Misbehaviour of apr_os_locale_encoding on Windows References: <4BC44316.6060709@rowe-clan.net> <4BC47D51.4060904@rowe-clan.net> In-Reply-To: X-Enigmail-Version: 1.0.1 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRF IhsbCy0qZjoVOVRoeFxSAIKBzXQiAKaibYiewnk7nn9z0qCTgL3i87Ep6Kx/+tHBsrE+zgAAAjZJ REFUOMvF0jFoE1EYB/CzjWlqIzaTjqVIBifRRWyG0t5iUqlLyFpCeXBgKg5yq6A4degUDJjoUDpc 1Qt4Ux94B11SOLB0KGS4discpbkORTCn9/m9d3fvLhXnvuHu3f+Xx/veyyfZfLSdZHzgicSfeyw4 JISwdz8FT6M8lM8Ceg385Dlhs+cC9sQCDn0B78QCogzwN+sxfHGOIXBbRGkNAM4cZymGtgNsDPgz cByxon3EEm1TLmvAlghoHOO3CZSa+IQ/vF6JV8tgKOMow78gRgL2/+EIvATOUtB3SSdMg4GXgrbn uk0uLiGdoCHKbX4E+t1FUTqn1AtIdPJebssDQ64YANSQyyaQNyUOFs0ijMsMFnOPTahPLXKYowtY 08MfCP7vR7hRnc5zmPK7CDYYbHcbC7tHuyFA94U/1LYZaJpu/sxACHMwvwZljTLY0TbNk4x+zuEt yC3MfCM6uSIvfwur0itFL4FA2Yal8BzLfnYV4EIGwEPAk7o5zIcnvzHMEjwJrrhAKK7on6IrsfRJ 7A53BhaK+CL7fj6+q/sPeOvcDTtoZTxpUYsFeIknrOXep3p3l7Ua+8sZ5FPQKyKwWi+DfROTU7ny C1/9UhpeY7K287WJCzbsNPQm2S6Yk4PSCNhWM2r3nD0K9liYb6yPgCRJhSzPrxUK0yUBVk1VX0lj s7MzGZyp0wImMK/e8rHbz2soL+O+2r1dxfGsAmBcx0lNjS/RUhlUC7gRn1wGMdQ7Vw1/AReW/RN3 xFWdAAAAAElFTkSuQmCC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 13.04.2010 16:29, Роман Донченко wrote: > William A. Rowe Jr. писал в своём письме Tue, 13 > Apr 2010 19:18:57 +0500: > >> And what is the encoding of that file? Certainly no assurance that data >> is unicode, or one of the local code pages. APR can't and doesn't >> try to >> deal with the representation of data passed around using APR. In >> general >> windows environment is very good about handling utf-8 data, although >> it's >> irritating in the insistence on polluting streams with BOM's. > > I agree that you can't reliably predict what encoding a file is in, > but I assert the system ANSI code page (which apr_os_locale_encoding > should IMO return) is a reasonable default. It's certainly not the > user locale's code page (which it currently returns) — because nothing > uses that. 8=] > >> Something APR should address, is that -printing- that to a console >> stream, >> a utf-8 stream can easily be handled with unicode. That's a problem apr >> could reasonably solve for command line apps. > > Perhaps, but printing to the console is not what's broken here. Well no, but ... as a matter of fact, most of the locale stuff in Subversion on Windows, starting with command-line parsing (we don't use apr_app_initialize) all the way to printing to the console (we don't use the wide-character printf variants) is subtly wrong. And on my head be it because I implemented all those bits and know about the deficiencies and haven't fixed it. That's not directly related to what apr_os_locale_encoding does, of course. I'm a bit surprised by WinAPI's behaviour there, though; it doesn't look like this is a problem that can be fixed just by changing how APR behaves, since APR doesn't know anything about how the application behaves. -- Brane