This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gnome 2.8.0 and external dependencies


Just try the small test program attached below

$ gcc -o localetest localetest.c
$ ./localetest fr_FR
changed to: (null)
current LC_ALl: C
current LC_CTYPE: C

$ gcc -o xlocaletest -DX_LOCALE -I/usr/X11R6/include localetest.c
-L/usr/X11R6/lib -lX11
$ ./xlocaletest fr_FR
changed to: fr_FR
current LC_ALl: fr_FR
current LC_CTYPE: fr_FR

(and IIRC, David Huang sent a message to this list discussing about
this issue last year,
but cgf said there's no one bother to improve the implementation of 
the locale support of cygwin1.dl itself)

best regards
Yang Guilong

On Wed, 29 Sep 2004 18:23:54 +0200, Gerrit P. Haase <gp@familiehaase.de> wrote:
> Yang Guilong said the following on 04-09-29 16:16:
> 
> > And I had just noticed another issue of gtk2: It was linked against
> > cygwin1.dll's setlocale(), which is taken as problematic.
> 
> Why?
> 
> > When I run gaim-1.0.0 with it, some locale features bahave weird, e.g
> > the XIM server couldn't be activated.
> > But when I turn to the gtk2 from cygnome2, everything work fine.
> >
> > Since gtk2-x11 has something to do with x11, we can turn to XLOCALE.
> > And that's the way cygnome2 does.
> 
> I want to see the reason why it doesn't work with setlocale().
> Have you debugged this?
> 
> Gerrit
> --
> =^..^=
> 

------------- 8< -------------- localetest.c-----------------------------
#ifdef X_LOCALE
#include <X11/Xlocale.h>
#else
#include <locale.h>
#endif


void check_locale()
{
    char *curr;

    /* Get the name of the current locale.  */
    curr=setlocale(LC_ALL, NULL);
    printf("current LC_ALl: %s\n", curr);

    curr=setlocale(LC_CTYPE, NULL);
    printf("current LC_CTYPE: %s\n", curr);
}

int main(int argc, char *argv[])
{
  if (argc<=1) {
    check_locale();
  } else {
    char *new;
    new = setlocale(LC_ALL, argv[1]);
    printf("changed to: %s\n", new);

    check_locale();
  }
   return 0;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]