]> mj.ucw.cz Git - libucw.git/commitdiff
second part of fixing URL printing: escape back all characters above 0x7f
authorRobert Spalek <robert@ucw.cz>
Thu, 30 Jun 2005 15:33:23 +0000 (15:33 +0000)
committerRobert Spalek <robert@ucw.cz>
Thu, 30 Jun 2005 15:33:23 +0000 (15:33 +0000)
note that it may happen that some incorrect words get highlighted after we
cut the escaped URL into words by lexmapper, but this is much better than
producing incorrect UTF-8 stream

lib/url.c
lib/url.h

index f805e32ff23f0f994dda2f7710a0e4b27807e824..e38238ec3973718b0badf8f56580eac6baac5ebd 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -50,7 +50,7 @@ static void CONSTRUCTOR url_init_config(void)
 
 /* Escaping and de-escaping */
 
-static uns
+uns
 enhex(uns x)
 {
   return (x<10) ? (x + '0') : (x - 10 + 'A');
index 30fc8fd7fa906464f5ac8ba064b9aa181e915adc..b7cb8bfb1888ae9b3026b4b56fa721b8e7bdf21e 100644 (file)
--- a/lib/url.h
+++ b/lib/url.h
@@ -45,6 +45,7 @@ struct url {
   byte *buf, *bufend;
 };
 
+uns enhex(uns x);
 int url_split(byte *s, struct url *u, byte *d);
 int url_normalize(struct url *u, struct url *b);
 int url_canonicalize(struct url *u);