Nala Ginrut <nalagin...@gmail.com> writes:

> Here is the patch. It solved the problem like these:
> @@ -1532,6 +1533,7 @@ scm_from_locale_string (const char *str)
>  SCM
>  scm_from_locale_stringn (const char *str, size_t len)
>  {
> +  setlocale (LC_ALL, "");
>    return scm_from_stringn (str, len, locale_charset (),
>                             scm_i_get_conversion_strategy (SCM_BOOL_F));
>  }
> @@ -1758,6 +1760,7 @@ scm_to_locale_string (SCM str)
>  char *
>  scm_to_locale_stringn (SCM str, size_t *lenp)
>  {
> +  setlocale (LC_ALL, "");
>    return scm_to_stringn (str, lenp, 
>                           locale_charset (),
>                           scm_i_get_conversion_strategy (SCM_BOOL_F));

This patch *breaks* scm_to_locale_string() and
scm_from_locale_string().  The documentation for these functions quite
clearly states that they use "the current locale", not "the locale
specified by the environment variables". Not to mention the fact that
they change the current locale without restoring it afterwards.

So no, please don't do this.  It's obviously the Wrong Thing.

                            Peter

-- 
Peter Brett <pe...@peter-b.co.uk>
Remote Sensing Research Group
Surrey Space Centre


Reply via email to