problems with run

Bengt-Arne Fjellner Bengt-Arne.Fjellner@ltu.se
Sat Jul 15 13:22:00 GMT 2006


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/


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /