bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 2173 in lilypond: Deal with file names not encoded in UTF-8


From: lilypond
Subject: Re: Issue 2173 in lilypond: Deal with file names not encoded in UTF-8
Date: Tue, 03 Jan 2012 09:03:07 +0000


Comment #1 on issue 2173 by address@hidden: Deal with file names not encoded in UTF-8
http://code.google.com/p/lilypond/issues/detail?id=2173

We have

static void
setup_localisation ()
{
#if HAVE_GETTEXT
  /* Enable locales */
  setlocale (LC_ALL, "");

  /* FIXME: check if this is still true.
     Disable localisation of float values. */
  setlocale (LC_NUMERIC, "C");

  string localedir = LOCALEDIR;
  if (char const *env = getenv ("LILYPOND_LOCALEDIR"))
    localedir = env;

  bindtextdomain ("lilypond", localedir.c_str ());
  textdomain ("lilypond");
#endif
}

in main.cc.  This is arguably wrong if LilyPond requires use of an
UTF-8 locale.

<URL:http://stackoverflow.com/questions/2050973/what-encoding-are-filenames-in-ntfs-stored-as>
weakly suggests that Windows might be using the currently set locale
for encoding/decoding file names with the usual function calls.  To
check if that is the case: Wilbert, can you check what possibilities
you have setting environments variables and/or other things to suggest
to Windows that you are running with a particular character encoding?

I remember that on Linux, perl is rather annoyed when getting bad
locales, so it might be worth trying whether it is useful as a litmus
test on Windows as well:

address@hidden:~$ LC_ALL=gdg perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en",
        LC_ALL = "gdg",
        LC_MESSAGES = "en_US.UTF-8",
        LC_COLLATE = "en_US.UTF-8",
        LC_CTYPE = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

Maybe we really don't need much more than the right call to setlocale
to have everything peachy.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]