[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Some i18n leftovers

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-07-20 18:51:45 CEST

Ok, found the %FF%FF problem. Simple signed vs unsigned char kind of
thing. Patch below.

  // Marcus

Index: subversion/libsvn_subr/path.c
===================================================================
--- subversion/libsvn_subr/path.c
+++ subversion/libsvn_subr/path.c Sat Jul 20 18:50:19 2002
@@ -784,7 +784,7 @@
       alphanum | mark | ":" | "@" | "&" | "=" | "+" | "$" | ","
 */
 static svn_boolean_t
-char_is_uri_safe (char c)
+char_is_uri_safe (int c)
 {
   /* Is this an alphanumeric character? */
   if (((c >= 'A') && (c <='Z'))
@@ -807,7 +807,7 @@
   apr_size_t i;

   for (i = 0; path[i]; i++)
- if (! char_is_uri_safe (path[i]))
+ if (! char_is_uri_safe ((unsigned char)path[i]))
       return FALSE;

   return TRUE;
@@ -819,7 +819,7 @@
 {
   svn_stringbuf_t *retstr;
   apr_size_t i, copied = 0;
- char c;
+ int c;

   if (! path)
     return NULL;
@@ -827,7 +827,7 @@
   retstr = svn_stringbuf_create ("", pool);
   for (i = 0; path[i]; i++)
     {
- c = path[i];
+ c = (unsigned char)path[i];
       if (char_is_uri_safe (c))
         continue;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 20 18:58:04 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.