X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=BAYES_00,SARE_SUB_ENC_UTF8 X-Spam-Check-By: sourceware.org Message-ID: <49E75CE7.4010004@danbbs.dk> Date: Thu, 16 Apr 2009 18:29:27 +0200 From: Gunnar Degnbol User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: UTF-8 problem/bug with Cygwin 1.7 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I have a strange problem with UTF-8 characters when running bash from the Windows command line. I hoped it would go away with the new Cygwin 1.7.0-46, but it is still there. Now I have simplified it down to setting LANG=en_US.UTF-8 and running bash -c "echo £" (where '£' can be any non-ascii character): C:\cygwin17\bin>set LANG=en_US.UTF-8 C:\cygwin17\bin>.\echo £ £ C:\cygwin17\bin>bash -c 'echo a' a C:\cygwin17\bin>bash -c 'echo £' bash: $'echo \302\243': command not found C:\cygwin17\bin>bash -c "$'echo \302\243'" bash: $'echo \302\243': command not found C:\cygwin17\bin>bash -c "echo $'\302\243'" £ It works if I don't set LANG, or set it to something else than UTF-8. It also works in Cygwin 1.5. Seems like UTF-8 makes bash escape the whole command line if it contains non-ascii characters. Maybe it should only escape the non-ascii characters? This might still cause problems with text in quotes. Gunnar -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/