groff
[Top][All Lists]
Advanced

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

[Groff] setlocale problem in groff


From: Werner LEMBERG
Subject: [Groff] setlocale problem in groff
Date: Sat, 12 Aug 2006 11:37:40 +0200 (CEST)

Bruno, 


you've added the following code to groff's src/include/lib.h:

  #ifdef HAVE_SETLOCALE
  #include <locale.h>
  #else
  #define setlocale(category, locale) do {} while(0)
  #endif

but this doesn't work if `HAVE_SETLOCALE' isn't defined, because in
preconv.cpp we have this:

  setlocale(LC_ALL, "");
  char *locale = setlocale(LC_CTYPE, NULL);                           // <----
  if (!locale || !strcmp(locale, "C") || !strcmp(locale, "POSIX"))
    default_encoding = "latin1";
  else
    default_encoding = locale_charset();

What do you recommend as a fix?


    Werner




reply via email to

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