- Subject: skip_non_word_chars failing in UTF-8 mode
- From: SANGOI DINO <SANGOID@xxxxxxxxxxxxxxxxx>
- Date: Tue, 3 May 2005 15:22:04 +0200
Hi,
I was working with Jed B0.99-17.95 and SLang 2.0.0 on Linux, when I got an
"Invalid UTF-8 encoded string" running a script. After a bit of debugging, I
found it was on skip_non_word_chars(). Debuging a bit of C code I found that
in UTF-8 mode it doesn't like the define_word() call full of invalid UTF-8
characters.
I tried also enabling UTF-8 on Windows, and the same problem comes out.
A simple patch could be:
--- site.sl.orig 2005-04-18 19:02:30.000000000 +0200
+++ site.sl 2005-05-03 16:36:53.185441176 +0200
@@ -188,7 +188,12 @@
#ifdef MSDOS
define_word("0-9a-zA-Z\200-\232\240-\245\341-\353");
#else
-define_word("0-9a-zA-Z\300-\326\330-\366\370-\377");
+# ifexists _slang_utf8_ok
+if (_slang_utf8_ok)
+ define_word("0-9a-zA-Z");
+else
+ define_word("0-9a-zA-Z\300-\326\330-\366\370-\377");
+# endif
#endif
%!%+
Or maybe adding the characters in UTF-8 encoding (using {}).
Later,
Dino
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]