1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

(string_titlecase_x): Treat characters as unsigned so that 8-bit chars

work.  Thanks to David Pirotte!
This commit is contained in:
Marius Vollmer 2002-03-11 17:52:41 +00:00
parent d955de820d
commit bd7c7fc637

View file

@ -2106,10 +2106,10 @@ SCM_DEFINE (scm_string_downcaseS, "string-downcase", 1, 2, 0,
static SCM static SCM
string_titlecase_x (SCM str, int start, int end) string_titlecase_x (SCM str, int start, int end)
{ {
char * sz; unsigned char * sz;
int i, in_word = 0; int i, in_word = 0;
sz = SCM_STRING_CHARS (str); sz = SCM_STRING_UCHARS (str);
for(i = start; i < end; i++) for(i = start; i < end; i++)
{ {
if (!SCM_FALSEP (scm_char_alphabetic_p (SCM_MAKE_CHAR (sz[i])))) if (!SCM_FALSEP (scm_char_alphabetic_p (SCM_MAKE_CHAR (sz[i]))))