www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
To: | cygwin AT cygwin DOT com |
From: | Thorsten Kampe <thorsten AT thorstenkampe DOT de> |
Subject: | Re: [Q] Use of UTF-8 in cygwin bash shell scripts |
Date: | Sat, 3 Apr 2004 00:41:43 +0200 |
Lines: | 49 |
Message-ID: | <113c098cpqdt6.dlg@thorstenkampe.de> |
References: | <CKEEILAKADKCNPNMDCJPIEAECAAA DOT arifi AT tnn DOT net> |
Mime-Version: | 1.0 |
X-Complaints-To: | usenet AT sea DOT gmane DOT org |
X-Gmane-NNTP-Posting-Host: | isi-dialin-129-215.isionline-dialin.de |
User-Agent: | 40tude_Dialog/2.0.10.1de |
* Arifi Koseoglu (2004-04-02 23:23 +0100) > I have a question regarding the use of UTF-8 in a cygwin-bash shell > script under windows XP and 2000 (does the behavior differ between > 2000 and XP ?). > > I have a bash script automatically generated with a Perl program, > which is supposed to copy files from one disk to another and at the > same time replace all international characters in the filename and > path with english counterparts (for example c with cedilla becomes > c). > > The lines in the shell script are all of the form: > > cp "source path with international chars in it" "target with no > international chars" > > The shell script is generated/saved in UTF-8 encoding. (since it > has to properly contain the international chars). By the way, with > international I mean the additional characters in the Turkish > alphabet - but the same question should apply to all non-english > alphabets. > > Now, I cannot get the script to work. I can 'ls' the files using > > $ ls "source path with international chars in it" > > the listing displays the Turkish characters properly, however > whenever I go ahead to execute the script, bash complains that > "source path with international chars in it" cannot be found. > > What am I missing? Does bash not support scripts encoded in UTF-8? *You* should know that otherwise trying to execute scripts is a waste of time. Ask Google as this is not Cygwin related. > Should I use another Unicode encoding (and how?) You might do that after you have investigated if bash supports it. > Or shoud I trash this method and try something else (what?). Use the ISO charset of your language. > There are thousands of files to be renamed. By using a shell (bash) script this should be a trivial task. Thorsten -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |