unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* string-split vs 8-bit chars
@ 2005-06-05  1:49 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2005-06-05  1:49 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

    (length (string-split (string #\a (integer->char 255) #\b)
                          (integer->char 255)))
    => 1

where I think it should be 2.

        * srfi-13.c (scm_string_split): Compare char/char in scan.  Mixing an
        unsigned int SCM_CHAR and a char string meant an 8-bit char was never
        matched.


[-- Attachment #2: srfi-13.c.split.diff --]
[-- Type: text/plain, Size: 255 bytes --]

--- srfi-13.c.~1.13.~	2005-05-26 09:04:39.000000000 +1000
+++ srfi-13.c	2005-06-05 11:44:55.672651856 +1000
@@ -3224,7 +3224,7 @@
 {
   long idx, last_idx;
   const char * p;
-  int ch;
+  char ch;
   SCM res = SCM_EOL;
 
   SCM_VALIDATE_STRING (1, str);

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-05  1:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-05  1:49 string-split vs 8-bit chars Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).