Update of /cvsroot/mahogany/M/src/util
In directory sc8-pr-cvs1:/tmp/cvs-serv29491/src/util
Modified Files:
matchurl.cpp
Log Message:
accept 8bit chars in URLs (bug 816)
Index: matchurl.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/matchurl.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -b -u -2 -r1.25 -r1.26
--- matchurl.cpp 15 Sep 2003 17:01:42 -0000 1.25
+++ matchurl.cpp 1 Oct 2003 22:13:53 -0000 1.26
@@ -413,8 +413,15 @@
static inline bool IsAlnum(char c)
{
- // we do *not* use isalnum() as we want to be locale-independent
+ // normally URLs should be in plain ASCII (7bit) but in practice some broken
+ // programs (people?) apparently write them using 8bit chars too so be
+ // liberal here and suppose that any 8 bit char can be part of the URL as
+ // there is no way for us to check it more precisely...
+ //
+ // OTOH we still don't use alnum() here because we don't want to depend on
+ // the current locale
return (c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
- (c >= '0' && c <= '9');
+ (c >= '0' && c <= '9') ||
+ (c > 0x7f);
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates