* [bug #31650] ice-9 regexp doesn't work with multibyte chars
@ 2010-11-14 10:59 Andy Wingo
2010-11-23 21:36 ` Andy Wingo
2011-01-21 7:35 ` Andy Wingo
0 siblings, 2 replies; 3+ messages in thread
From: Andy Wingo @ 2010-11-14 10:59 UTC (permalink / raw)
To: Andy Wingo, bug-guile
URL:
<http://savannah.gnu.org/bugs/?31650>
Summary: ice-9 regexp doesn't work with multibyte chars
Project: Guile
Submitted by: wingo
Submitted on: Sun 14 Nov 2010 10:59:13 AM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Steps to reproduce:
> (setlocale LC_ALL)
> (match:substring (string-match ".*" "calçot") 0)
Expected results:
"calçot"
Actual results:
ERROR: In procedure substring:
ERROR: Value out of range 0 to 6: 7
I think what is happening is that as per
http://www.gnu.org/software/libc/manual/html_node/Regexp-Subexpressions.html#Regexp-Subexpressions,
the regmatch_t structure gives us *byte offsets* at which the string matched,
but Guile's match structures need *char offsets*. So we need to be able to do
a reverse mapping between byte index of a string as encoded in the current
locale to the character index.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31650>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug #31650] ice-9 regexp doesn't work with multibyte chars
2010-11-14 10:59 [bug #31650] ice-9 regexp doesn't work with multibyte chars Andy Wingo
@ 2010-11-23 21:36 ` Andy Wingo
2011-01-21 7:35 ` Andy Wingo
1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2010-11-23 21:36 UTC (permalink / raw)
To: Andy Wingo, bug-guile
Update of bug #31650 (project guile):
Status: None => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
Fixed in git.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31650>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [bug #31650] ice-9 regexp doesn't work with multibyte chars
2010-11-14 10:59 [bug #31650] ice-9 regexp doesn't work with multibyte chars Andy Wingo
2010-11-23 21:36 ` Andy Wingo
@ 2011-01-21 7:35 ` Andy Wingo
1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2011-01-21 7:35 UTC (permalink / raw)
To: Andy Wingo, bug-guile
Update of bug #31650 (project guile):
Status: None => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
I totally fixed this one. Totally.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31650>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-21 7:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-14 10:59 [bug #31650] ice-9 regexp doesn't work with multibyte chars Andy Wingo
2010-11-23 21:36 ` Andy Wingo
2011-01-21 7:35 ` Andy Wingo
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).