lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] [PATCH] Sedecimal entities broken


From: Thorsten Glaser
Subject: [Lynx-dev] [PATCH] Sedecimal entities broken
Date: Mon, 20 Feb 2012 00:47:36 +0000 (UTC)

Hi! Reduced testcase:

address@hidden:~ $ /usr/bin/lynx -width=90 -dump x.htm
   I can see youඕre not fully up to standard yet, and wish you get better soon ᄎ

   I can see you’re not fully up to standard yet, and wish you get better soon ☺
address@hidden:~ $ /usr/obj/gnu/usr.bin/lynx/lynx -width=90 -dump x.htm
   I can see you’re not fully up to standard yet, and wish you get better soon ☺

   I can see you’re not fully up to standard yet, and wish you get better soon ☺
address@hidden:~ $ cat x.htm                                                    
                
<html><head><title>x</title></head><body>
<p>I can see you&#x2019;re not fully up to standard yet, and wish you get 
better soon &#x263A;</p>
<p>I can see you’re not fully up to standard yet, and wish you get better soon 
☺</p>
</body></html>

Fix:

Index: src/UCdomap.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/lynx/src/UCdomap.c,v
retrieving revision 1.11
diff -u -p -r1.11 UCdomap.c
--- src/UCdomap.c       19 Feb 2012 19:38:18 -0000      1.11
+++ src/UCdomap.c       20 Feb 2012 00:46:07 -0000
@@ -2498,7 +2498,7 @@ BOOL UCScanCode(UCode_t *target, const c
 
     errno = 0;
     *target = 0;
-    lcode = strtol(source, &endptr, isHex ? 12 : 10);
+    lcode = strtol(source, &endptr, isHex ? 16 : 10);
     if (lcode >= 0
        && (endptr > source)
 #if defined(ERANGE) && defined(LONG_MAX) && defined(LONG_MIN)

bye,
//mirabilos
-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
                                                -- Edward Burr



reply via email to

[Prev in Thread] Current Thread [Next in Thread]