delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/07/15/08:54:16

X-Spam-Check-By: sourceware.org
Message-ID: <1108.130.240.136.130.1152968035.squirrel@pinus.tt.luth.se>
In-Reply-To: <44B8495E.8040501@s1999.tu-chemnitz.de>
References: <2183 DOT 130 DOT 240 DOT 136 DOT 130 DOT 1152892603 DOT squirrel AT pinus DOT tt DOT luth DOT se> <44B7E207 DOT 4050002 AT s1999 DOT tu-chemnitz DOT de> <1150 DOT 130 DOT 240 DOT 136 DOT 130 DOT 1152905806 DOT squirrel AT pinus DOT tt DOT luth DOT se> <44B8495E DOT 8040501 AT s1999 DOT tu-chemnitz DOT de>
Date: Sat, 15 Jul 2006 14:53:55 +0200 (CEST)
Subject: Re: problems with run
From: "Bengt-Arne Fjellner" <Bengt-Arne DOT Fjellner AT ltu DOT se>
To: cygwin AT cygwin DOT com
User-Agent: SquirrelMail/1.4.5
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

Alexander Gottwald skrev:
> Bengt-Arne Fjellner wrote:
>
> Taking this back to the list. I missed to adjust the To: field.
>
>> Alexander Gottwald skrev:
>>> Bengt-Arne Fjellner wrote:
>>>> Upgrade from run-1.1.6-1 to run-1.1.10-1 gives me problems.
>>>> Variables that have national chars gets wrong codepage
>>>> I have narrowed it down so that 1.1.6 works but not 1.1.7
>>> The change from 1.1.6 to 1.1.7 was to copy the cygwin environment
>>> variables back to windows. Are the string encoded differently in cygwin
>>> than in win32?
>>
>> I think so they are even differently encoded in windows/dos
>>
>> if i do echo هنِ>file   (three swedish chars) in a dos box resp in an xterm
>> i get different results in the file
>> cmd gives me the string (bash format)
>> $'\206\204\224'
>>
>> in cygwin it gives
>> $'\345\344\366'
>>
>> Windows is fun isnt it :-)
>> Win32api has
>> CharToOem and  CharToOemBuff, OemToChar, OemToCharBuff
>> to deal with this but im never sure which one to use....
>
> Hm, I'll take a look. German letters should trigger that too.
>
> bye
> 	ago
>

this patch works for me but.....

$ diff -u run-1.1.10/src/run.c run-1.1.10.baf/src/run.c
--- run-1.1.10/src/run.c        2006-05-22 14:32:43.000000000 +0200
+++ run-1.1.10.baf/src/run.c    2006-07-15 14:49:58.748664000 +0200
@@ -188,6 +188,13 @@
                        if (GetEnvironmentVariable(var, curval, 2) == 0 &&
                            GetLastError() == ERROR_ENVVAR_NOT_FOUND)
                        {
+                       #ifdef DEBUG
+                         Trace(("Pretrans\nvar=%s\nval=%s",var,val));
+                       #endif
+                         OemToChar(val,val);
+                       #ifdef DEBUG
+                         Trace(("Posttrans\nvar=%s\nval=%s",var,val));
+                       #endif
                                SetEnvironmentVariable(var, val);
                        }
                }
@@ -692,7 +699,8 @@
         if (stricmp(&(s1[len1-len2]),s2) == 0)
             retval = TRUE;
     return retval;
-}void strip_exe(char* s)
+}
+void strip_exe(char* s)
 {
    if ((strlen(s) > 4) && /* long enough to have .exe extension */
        /* second part not evaluated (short circuit) if exec_arg too short */


-- 
Bengt-Arne Fjellner



--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019