From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "objc" Newsgroups: gmane.lisp.guile.user Subject: guile 2.0.1 working on cygwin (probably 2.0.0 also) Date: Mon, 23 May 2011 02:59:47 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000A_01CC18F5.79DF8E50" X-Trace: dough.gmane.org 1306117202 24336 80.91.229.12 (23 May 2011 02:20:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 May 2011 02:20:02 +0000 (UTC) To: Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon May 23 04:19:58 2011 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QOKkP-0003yq-4E for guile-user@m.gmane.org; Mon, 23 May 2011 04:19:57 +0200 Original-Received: from localhost ([::1]:59741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOKkN-00065m-NJ for guile-user@m.gmane.org; Sun, 22 May 2011 22:19:55 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOKkJ-00065U-Qc for guile-user@gnu.org; Sun, 22 May 2011 22:19:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOKkI-0001FL-7M for guile-user@gnu.org; Sun, 22 May 2011 22:19:51 -0400 Original-Received: from snt0-omc4-s5.snt0.hotmail.com ([65.55.90.208]:16579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOKkH-0001FH-Pg for guile-user@gnu.org; Sun, 22 May 2011 22:19:50 -0400 Original-Received: from SNT127-DS10 ([65.55.90.201]) by snt0-omc4-s5.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 22 May 2011 18:59:47 -0700 X-Originating-IP: [86.144.158.132] X-Originating-Email: [objcjohn@hotmail.com] X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-OriginalArrivalTime: 23 May 2011 01:59:47.0518 (UTC) FILETIME=[17F575E0:01CC18ED] X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+ X-Received-From: 65.55.90.208 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:8619 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_000A_01CC18F5.79DF8E50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Guilers, I've got guile 2.0.1 to work on cygwin with a nasty "test hack". in scm_to_stringn function: ret =3D mem_iconveh (jrgbuf, ilen, "ISO-8859-1" //?????????? , enc,//"ANSI_X3.4-1968" "ISO-8859-1" "UTF-8" (enum iconv_ilseq_handler) handler, NULL, &buf, &len); The mem_iconveh function fails. re-trying with "ANSI_X3.4-1968" or "UTF-8" in the //?????????? gets it = work. I've got guile 2.0.1 to work on cygwin, but have not investigated how or = why it works. Any thoughts of a fix ? Cheers, objcjohn libguile/strings.c (orig.) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D char * scm_to_stringn (SCM str, size_t *lenp, const char *encoding, scm_t_string_failed_conversion_handler handler) { char *buf; size_t ilen, len, i; int ret; const char *enc; if (!scm_is_string (str)) scm_wrong_type_arg_msg (NULL, 0, str, "string"); ilen =3D scm_i_string_length (str); if (ilen =3D=3D 0) { buf =3D scm_malloc (1); buf[0] =3D '\0'; if (lenp) *lenp =3D 0; return buf; } if (lenp =3D=3D NULL) for (i =3D 0; i < ilen; i++) if (scm_i_string_ref (str, i) =3D=3D '\0') scm_misc_error (NULL, "string contains #\\nul character: ~S", scm_list_1 (str)); if (scm_i_is_narrow_string (str) && (encoding =3D=3D NULL)) { /* If using native Latin-1 encoding, just copy the string contents. */ if (lenp) { buf =3D scm_malloc (ilen); memcpy (buf, scm_i_string_chars (str), ilen); *lenp =3D ilen; return buf; } else { buf =3D scm_malloc (ilen + 1); memcpy (buf, scm_i_string_chars (str), ilen); buf[ilen] =3D '\0'; return buf; } } buf =3D NULL; len =3D 0; enc =3D encoding; if (enc =3D=3D NULL) enc =3D "ISO-8859-1"; if (scm_i_is_narrow_string (str)) { ret =3D mem_iconveh (scm_i_string_chars (str), ilen, "ISO-8859-1", enc, (enum iconv_ilseq_handler) handler, NULL, &buf, &len); if (ret !=3D 0) scm_encoding_error (__func__, errno, "cannot convert narrow string to output locale", SCM_BOOL_F, /* FIXME: Faulty character unknown. */ SCM_BOOL_F); } else { buf =3D u32_conv_to_encoding (enc, (enum iconv_ilseq_handler) handler, (scm_t_uint32 *) = scm_i_string_wide_chars (str), ilen, NULL, NULL, &len); if (buf =3D=3D NULL) scm_encoding_error (__func__, errno, "cannot convert wide string to output locale", SCM_BOOL_F, /* FIXME: Faulty character unknown. */ SCM_BOOL_F); } if (handler =3D=3D SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE) { if (SCM_R6RS_ESCAPES_P) { /* The worst case is if the input string contains all 4-digit hex escapes. "\uXXXX" (six characters) becomes "\xXXXX;" (seven characters). Make BUF large enough to hold that. */ buf =3D scm_realloc (buf, (len * 7) / 6 + 1); unistring_escapes_to_r6rs_escapes (buf, &len); } else unistring_escapes_to_guile_escapes (buf, &len); buf =3D scm_realloc (buf, len); } if (lenp) *lenp =3D len; else { buf =3D scm_realloc (buf, len + 1); buf[len] =3D '\0'; } scm_remember_upto_here_1 (str); return buf; } libguile/strings.c (test) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D char * scm_to_stringn (SCM str, size_t *lenp, const char *encoding, scm_t_string_failed_conversion_handler handler) { char *buf; const char *jrgbuf;//jrg size_t ilen, len, i; int ret; const char *enc; if (!scm_is_string (str)) scm_wrong_type_arg_msg (NULL, 0, str, "string"); ilen =3D scm_i_string_length (str); if (ilen =3D=3D 0) { buf =3D scm_malloc (1); buf[0] =3D '\0'; if (lenp) *lenp =3D 0; return buf; } if (lenp =3D=3D NULL) for (i =3D 0; i < ilen; i++) if (scm_i_string_ref (str, i) =3D=3D '\0') scm_misc_error (NULL, "string contains #\\nul character: ~S", scm_list_1 (str)); if (scm_i_is_narrow_string (str) && (encoding =3D=3D NULL)) { /* If using native Latin-1 encoding, just copy the string contents. */ if (lenp) { buf =3D scm_malloc (ilen); memcpy (buf, scm_i_string_chars (str), ilen); *lenp =3D ilen; return buf; } else { buf =3D scm_malloc (ilen + 1); memcpy (buf, scm_i_string_chars (str), ilen); buf[ilen] =3D '\0'; return buf; } } buf =3D NULL; jrgbuf =3D NULL; len =3D 0; enc =3D encoding; //jrg if (enc =3D=3D NULL) enc =3D "ISO-8859-1"; if (enc =3D=3D NULL) enc =3D "ANSI_X3.4-1968"; if (scm_i_is_narrow_string (str)) { jrgbuf =3D scm_i_string_chars (str); //jrg // fprintf (stderr,"jrgbuf = [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t )lenp);//jrg ret =3D mem_iconveh (jrgbuf, ilen, "ANSI_X3.4-1968", enc,//"ANSI_X3.4-1968" = "ISO-8859-1" "UTF-8" (enum iconv_ilseq_handler) handler, NULL, &buf, &len); if (ret !=3D 0) {//jrg //try another one !! // fprintf (stderr,"try ISO-8859-1 jrgbuf = [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t )lenp);//jrg ret =3D mem_iconveh (jrgbuf, ilen, "ISO-8859-1", enc,//"ANSI_X3.4-1968" = "ISO-8859-1" "UTF-8" (enum iconv_ilseq_handler) handler, NULL, &buf, &len); } if (ret !=3D 0) {//jrg //try another one !! // fprintf (stderr,"try UTF-8jrgbuf = [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t )lenp);//jrg ret =3D mem_iconveh (jrgbuf, ilen, "UTF-8", enc,//"ANSI_X3.4-1968" "ISO-8859-1" = "UTF-8" (enum iconv_ilseq_handler) handler, NULL, &buf, &len); } if (ret !=3D 0) {//jrg printf("(ret !=3D 0) jrgbuf [%s] buf[%s]\n",jrgbuf,buf);//jrg fprintf (stderr,"failed return jrgbuf jrgbuf = [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t )lenp);//jrg return (char*)jrgbuf;//hmmm scm_encoding_error (__func__, errno, "cannot convert narrow string to output locale", SCM_BOOL_F, /* FIXME: Faulty character unknown. */ SCM_BOOL_F); }//jrg } else { jrgbuf =3D (char *)(scm_t_uint32 *) scm_i_string_wide_chars (str); = //jrg fprintf (stderr,"jrgbuf = [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t )lenp);//jrg buf =3D u32_conv_to_encoding (enc, (enum iconv_ilseq_handler) handler, (scm_t_uint32 *) = scm_i_string_wide_chars (str), ilen, NULL, NULL, &len); if (buf =3D=3D NULL) {//jrg printf("(buf =3D=3D NULL) jrgbuf [%s] buf = [%s]\n",jrgbuf,buf);//jrg scm_encoding_error (__func__, errno, "cannot convert wide string to output locale", SCM_BOOL_F, /* FIXME: Faulty character unknown. */ SCM_BOOL_F); } } if (handler =3D=3D SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE) { if (SCM_R6RS_ESCAPES_P) { /* The worst case is if the input string contains all 4-digit hex escapes. "\uXXXX" (six characters) becomes "\xXXXX;" (seven characters). Make BUF large enough to hold that. */ buf =3D scm_realloc (buf, (len * 7) / 6 + 1); unistring_escapes_to_r6rs_escapes (buf, &len); } else unistring_escapes_to_guile_escapes (buf, &len); buf =3D scm_realloc (buf, len); } if (lenp) *lenp =3D len; else { buf =3D scm_realloc (buf, len + 1); buf[len] =3D '\0'; } scm_remember_upto_here_1 (str); return buf; } ------=_NextPart_000_000A_01CC18F5.79DF8E50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Guilers,
 
I've got guile 2.0.1 to work on cygwin = with a nasty=20 "test hack".
 
in scm_to_stringn = function:
 
      ret =3D = mem_iconveh=20 (jrgbuf,=20 ilen,
          &nbs= p;            = ; =20 "ISO-8859-1"
          =             &= nbsp;=20 //??????????
          =             &= nbsp;=20 , enc,//"ANSI_X3.4-1968"  "ISO-8859-1"=20 "UTF-8"
          &n= bsp;           &nb= sp; =20 (enum iconv_ilseq_handler) handler,=20 NULL,
          &nbs= p;            = ; =20 &buf, &len);
 
The mem_iconveh function = fails.
re-trying with "ANSI_X3.4-1968" or = "UTF-8" in the=20 //?????????? gets it work.
 
I've got guile 2.0.1 to work on cygwin, = but have=20 not investigated how or why it works.
Any thoughts of a fix ?
 
Cheers,
objcjohn
 
libguile/strings.c (orig.)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
char *
scm_to_stringn (SCM str, size_t *lenp, = const char=20 *encoding,
          = ;     =20 scm_t_string_failed_conversion_handler handler)
{
  char=20 *buf;
  size_t ilen, len, i;
  int ret;
  const = char=20 *enc;
 
  if (!scm_is_string=20 (str))
    scm_wrong_type_arg_msg (NULL, 0, str,=20 "string");
  ilen =3D scm_i_string_length (str);
 
  if (ilen =3D=3D = 0)
   =20 {
      buf =3D scm_malloc=20 (1);
      buf[0] =3D=20 '\0';
      if=20 (lenp)
        *lenp =3D=20 0;
      return buf;
   =20 }
 
  if (lenp =3D=3D = NULL)
    for=20 (i =3D 0; i < ilen; i++)
      if = (scm_i_string_ref=20 (str, i) =3D=3D '\0')
        = scm_misc_error=20 (NULL,
          &nb= sp;           &nbs= p;=20 "string contains #\\nul character:=20 ~S",
           = ;            = =20 scm_list_1 (str));
 
  if (scm_i_is_narrow_string (str) = &&=20 (encoding =3D=3D NULL))
    = {
      /*=20 If using native Latin-1 encoding, just copy the=20 string
         = contents. =20 */
      if=20 (lenp)
       =20 {
          buf =3D = scm_malloc=20 (ilen);
          memcpy = (buf,=20 scm_i_string_chars (str),=20 ilen);
          *lenp = =3D=20 ilen;
          return=20 buf;
       =20 }
     =20 else
       =20 {
          buf =3D = scm_malloc=20 (ilen + 1);
          = memcpy=20 (buf, scm_i_string_chars (str),=20 ilen);
          = buf[ilen] =3D=20 '\0';
          return=20 buf;
        = }
   =20 }
 

  buf =3D NULL;
  len =3D 0;
  enc =3D=20 encoding;
  if (enc =3D=3D NULL)
    enc =3D=20 "ISO-8859-1";
  if (scm_i_is_narrow_string = (str))
   =20 {
      ret =3D mem_iconveh = (scm_i_string_chars (str),=20 ilen,
          &nbs= p;            = ; =20 "ISO-8859-1",=20 enc,
           = ;            =  =20 (enum iconv_ilseq_handler) handler,=20 NULL,
          &nbs= p;            = ; =20 &buf, &len);
 
      if (ret !=3D=20 0)
        scm_encoding_error = (__func__,=20 errno,
       "cannot convert narrow = string to=20 output locale",
      =20 SCM_BOOL_F,
       /* FIXME: Faulty = character=20 unknown.  */
      =20 SCM_BOOL_F);
    }
  = else
   =20 {
      buf =3D u32_conv_to_encoding=20 (enc,
          &nbs= p;            = ;          =20 (enum iconv_ilseq_handler)=20 handler,
          &= nbsp;           &n= bsp;          =20 (scm_t_uint32 *) scm_i_string_wide_chars=20 (str),
          &nb= sp;           &nbs= p;          =20 ilen,
          &nbs= p;            = ;          =20 NULL,
          &nbs= p;            = ;          =20 NULL, &len);
      if (buf =3D=3D=20 NULL)
        scm_encoding_error=20 (__func__, errno,
       "cannot = convert wide=20 string to output locale",
      =20 SCM_BOOL_F,
       /* FIXME: Faulty = character=20 unknown.  */
      =20 SCM_BOOL_F);
    }
  if (handler =3D=3D=20 SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE)
   =20 {
      if=20 (SCM_R6RS_ESCAPES_P)
 {
   /* The worst case is if = the=20 input string contains all 4-digit
      hex=20 escapes.  "\uXXXX" (six characters) becomes=20 "\xXXXX;"
      (seven characters).  = Make BUF=20 large enough to hold
      that. =20 */
   buf =3D scm_realloc (buf, (len * 7) / 6 + = 1);
  =20 unistring_escapes_to_r6rs_escapes (buf,=20 &len);
 }
     =20 else
       =20 unistring_escapes_to_guile_escapes (buf, &len);
 
      buf =3D scm_realloc (buf,=20 len);
    }
  if (lenp)
    = *lenp =3D=20 len;
  else
    = {
     =20 buf =3D scm_realloc (buf, len + 1);
      = buf[len] =3D=20 '\0';
    }
 
  scm_remember_upto_here_1 (str);
  return = buf;
}
 
libguile/strings.c (test)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
char *
scm_to_stringn (SCM str, size_t *lenp, const char=20 *encoding,
          = ;     =20 scm_t_string_failed_conversion_handler handler)
{
  char=20 *buf;
  const char *jrgbuf;//jrg
  size_t ilen, len,=20 i;
  int ret;
  const char *enc;
 
  if (!scm_is_string (str))
   =20 scm_wrong_type_arg_msg (NULL, 0, str, "string");
  ilen =3D=20 scm_i_string_length (str);
 
  if (ilen =3D=3D 0)
   =20 {
      buf =3D scm_malloc=20 (1);
      buf[0] =3D=20 '\0';
      if=20 (lenp)
        *lenp =3D=20 0;
      return buf;
    = }
 
  if (lenp =3D=3D NULL)
    for (i =3D 0; i = < ilen;=20 i++)
      if (scm_i_string_ref (str, i) = =3D=3D=20 '\0')
        scm_misc_error=20 (NULL,
          &nb= sp;           &nbs= p;=20 "string contains #\\nul character:=20 ~S",
           = ;            = =20 scm_list_1 (str));
 
  if (scm_i_is_narrow_string (str) && (encoding =3D=3D = NULL))
    {
      /* If = using=20 native Latin-1 encoding, just copy the=20 string
         = contents. =20 */
      if=20 (lenp)
       =20 {
          buf =3D = scm_malloc=20 (ilen);
          memcpy = (buf,=20 scm_i_string_chars (str),=20 ilen);
          *lenp = =3D=20 ilen;
          return=20 buf;
       =20 }
     =20 else
       =20 {
          buf =3D = scm_malloc=20 (ilen + 1);
          = memcpy=20 (buf, scm_i_string_chars (str),=20 ilen);
          = buf[ilen] =3D=20 '\0';
          return=20 buf;
        = }
   =20 }
 

  buf =3D NULL;
  jrgbuf =3D NULL;
  len = =3D=20 0;
  enc =3D encoding;
 
//jrg  if (enc =3D=3D NULL) enc =3D "ISO-8859-1";
  if = (enc =3D=3D NULL)=20 enc =3D "ANSI_X3.4-1968";
 
  if (scm_i_is_narrow_string (str))
   =20 {
   jrgbuf =3D scm_i_string_chars = (str);    =20 //jrg
//      fprintf (stderr,"jrgbuf=20 [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t=20 )lenp);//jrg
      ret =3D mem_iconveh = (jrgbuf,=20 ilen,
          &nbs= p;            = ; =20 "ANSI_X3.4-1968", enc,//"ANSI_X3.4-1968"  "ISO-8859-1"=20 "UTF-8"
          &n= bsp;           &nb= sp; =20 (enum iconv_ilseq_handler) handler,=20 NULL,
          &nbs= p;            = ; =20 &buf, &len);
 
      if (ret !=3D=20 0)
      = {//jrg
     =20 //try another one !!
//      fprintf = (stderr,"try=20 ISO-8859-1 jrgbuf=20 [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t=20 )lenp);//jrg
      ret =3D mem_iconveh = (jrgbuf,=20 ilen,
          &nbs= p;            = ; =20 "ISO-8859-1", enc,//"ANSI_X3.4-1968"  "ISO-8859-1"=20 "UTF-8"
          &n= bsp;           &nb= sp; =20 (enum iconv_ilseq_handler) handler,=20 NULL,
          &nbs= p;            = ; =20 &buf, &len);
     =20 }
      if (ret !=3D=20 0)
      = {//jrg
     =20 //try another one !!
//      fprintf = (stderr,"try=20 UTF-8jrgbuf=20 [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t=20 )lenp);//jrg
      ret =3D mem_iconveh = (jrgbuf,=20 ilen,
          &nbs= p;            = ; =20 "UTF-8", enc,//"ANSI_X3.4-1968"  "ISO-8859-1"=20 "UTF-8"
          &n= bsp;           &nb= sp; =20 (enum iconv_ilseq_handler) handler,=20 NULL,
          &nbs= p;            = ; =20 &buf, &len);
     =20 }
      if (ret !=3D=20 0)
      {//jrg
 
        printf("(ret !=3D 0) = jrgbuf [%s]=20 buf[%s]\n",jrgbuf,buf);//jrg
       = fprintf=20 (stderr,"failed return jrgbuf jrgbuf=20 [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t=20 )lenp);//jrg
        return=20 (char*)jrgbuf;//hmmm
 
        scm_encoding_error = (__func__,=20 errno,
       "cannot convert narrow = string to=20 output locale",
      =20 SCM_BOOL_F,
       /* FIXME: Faulty = character=20 unknown.  */
      =20 SCM_BOOL_F);
   }//jrg
    }
 =20 else
    {
   jrgbuf =3D (char = *)(scm_t_uint32 *)=20 scm_i_string_wide_chars (str);     = //jrg
  =20 fprintf (stderr,"jrgbuf=20 [%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)= (size_t=20 )lenp);//jrg
      buf =3D = u32_conv_to_encoding=20 (enc,
          &nbs= p;            = ;          =20 (enum iconv_ilseq_handler)=20 handler,
          &= nbsp;           &n= bsp;          =20 (scm_t_uint32 *) scm_i_string_wide_chars=20 (str),
          &nb= sp;           &nbs= p;          =20 ilen,
          &nbs= p;            = ;          =20 NULL,
          &nbs= p;            = ;          =20 NULL, &len);
      if (buf =3D=3D=20 NULL)
     =20 {//jrg
        printf("(buf =3D=3D = NULL)=20 jrgbuf [%s] buf=20 [%s]\n",jrgbuf,buf);//jrg
       =20 scm_encoding_error (__func__, = errno,
      =20 "cannot convert wide string to output=20 locale",
      =20 SCM_BOOL_F,
       /* FIXME: Faulty = character=20 unknown.  */
      =20 SCM_BOOL_F);
   }
    }
  if = (handler =3D=3D=20 SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE)
   =20 {
      if=20 (SCM_R6RS_ESCAPES_P)
 {
   /* The worst case is if = the=20 input string contains all 4-digit
      hex=20 escapes.  "\uXXXX" (six characters) becomes=20 "\xXXXX;"
      (seven characters).  = Make BUF=20 large enough to hold
      that. =20 */
   buf =3D scm_realloc (buf, (len * 7) / 6 + = 1);
  =20 unistring_escapes_to_r6rs_escapes (buf,=20 &len);
 }
     =20 else
       =20 unistring_escapes_to_guile_escapes (buf, &len);
 
      buf =3D scm_realloc (buf,=20 len);
    }
  if (lenp)
    = *lenp =3D=20 len;
  else
    = {
     =20 buf =3D scm_realloc (buf, len + 1);
      = buf[len] =3D=20 '\0';
    }
 
  scm_remember_upto_here_1 (str);
  return=20 buf;
}
------=_NextPart_000_000A_01CC18F5.79DF8E50--