[Remind-Fans] Problem with German month names in remind scripts
David F. Skoll
dfs at roaringpenguin.com
Mon Sep 13 20:17:34 EDT 2010
Simon Ruderich wrote:
> I'm a new user of remind and so far I love it. I have only one
> problem: When I was testing the German version I though I could
> enter German month/weekday names like this:
> REM 1 Oktober MSG Do something! %b
> REM Die MSG Do something! %b
> (Die = Dienstag = Tuesday)
> But this doesn't work. If I change it to October or Tue it works
> fine (the output is in German).
Your patch is almost correct (I've put a corrected version at the end of
this message.)
But I recommend against using non-English month names, etc. This will
make your file less portable. It will only work with a version of Remind
compiled for German.
(I think it was a misfeature for Remind to accept localized names on *input*
and it might be removed in a future version.)
Regards,
David.
diff --git a/src/token.c b/src/token.c
index d8f1e37..14d48eb 100644
--- a/src/token.c
+++ b/src/token.c
@@ -360,7 +360,7 @@ static int TokStrCmp(Token const *t, char const *s)
register int r;
char const *tk = t->name;
while(*tk && *s && !(*s == ',' && *(s+1) == 0)) {
- r = *tk - tolower(*s);
+ r = tolower(*tk) - tolower(*s);
tk++;
s++;
if (r) return r;
@@ -368,5 +368,5 @@ static int TokStrCmp(Token const *t, char const *s)
/* Ignore trailing commas on s */
if (!*s || (*s == ',' && !*(s+1))) return 0;
- return (*tk - *s);
+ return (tolower(*tk) - tolower(*s));
}
More information about the Remind-fans
mailing list