delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/26/04:06:43

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BD9135D.A7E3393F@syntrex.com>
Date: Fri, 26 Oct 2001 09:40:13 +0200
From: Pavel Tsekov <ptsekov AT syntrex DOT com>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Language Problems with cygwin (newlib/ctype)
References: <OFCBA78C2C DOT 063E6023-ONC1256AF1 DOT 00265CF1 AT twt-gmbh DOT de>

felix DOT schaller AT twt-gmbh DOT de wrote:
> 
> hello
> 
> i'm having problems with the newlib package
> especially the module "ctype.h" which is responsible for recognizing
> characters
> the problem is, that it doesnt recognize UTF-8 characters like umlauts or
> accents
> 
> first i tried to solve it by setting the enviroment variables to
> 
> LANG=de
> LC_CTYPE=de etc.
> 
> but had no effect, then i recognized that ctype is hardcoding the
> definition of characters
> so i enhanced the table in "ctype_.c" like this
> 
> #define _CTYPE_DATA_0_127 \
>      _C,  _C,  _C,  _C,  _C,  _C,  _C,   _C, \
>      _C,  _C|_S,    _C|_S,    _C|_S,     _C|_S,    _C|_S,    _C,  _C, \
>      _C,  _C,  _C,  _C,  _C,  _C,  _C,   _C, \
>      _C,  _C,  _C,  _C,  _C,  _C,  _C,   _C, \
>      _S|_B,    _P,  _P,  _P,  _P,  _P,   _P,  _P, \
>      _P,  _P,  _P,  _P,  _P,  _P,  _P,   _P, \
>      _N,  _N,  _N,  _N,  _N,  _N,  _N,   _N, \
>      _N,  _N,  _P,  _P,  _P,  _P,  _P,   _P, \
>      _P,  _U|_X,    _U|_X,    _U|_X,     _U|_X,    _U|_X,    _U|_X,    _U,
> \
>      _U,  _U,  _U,  _U,  _U,  _U,  _U,   _U, \
>      _U,  _U,  _U,  _U,  _U,  _U,  _U,   _U, \
>      _U,  _U,  _U,  _P,  _P,  _P,  _P,   _P, \
>      _P,  _L|_X,    _L|_X,    _L|_X,     _L|_X,    _L|_X,    _L|_X,    _L,
> \
>      _L,  _L,  _L,  _L,  _L,  _L,  _L,   _L, \
>      _L,  _L,  _L,  _L,  _L,  _L,  _L,   _L, \
>      _L,  _L,  _L,  _P,  _P,  _P,  _P,   _C
> 
> #define _CTYPE_DATA_128_256 \
>      0,   0,   _P,  0,   _P,  0,   0,    0, \
>      _P,  _P,  _U,  _P,  _U,  0,   _U,   0, \
>      0,   _P,  _P,  _P,  _P,  _P,  _P,   _P, \
>      _P,  _U|_L,    _L,  _P,  _L,  0,    _L,  _L, \
>      0,   _P,  _P,  _P,  _P,  _P,  _P,   _P, \
>      0,   _U|_L,    _P,  _P,  _P,  _P,   _P,  _P, \
>      _P,  _P,  _P,  _P,  _P,  _P,  _P,   _P, \
>      _P,  _P,  _P,  _P,  _P,  _P,  _P,   _P, \
>      _U,  _U,  _U,  _U,  _U,  _U,  _U,   _U, \
>      _U,  _U,  _U,  _U,  _U,  _U,  _U,   _U, \
>      _U,  _U,  _U,  _U,  _U,  _U,  _U,   _P, \
>      _P,  _U,  _U,  _U,  _U,  _U,  _L,   _L, \
>      _L,  _L,  _L,  _L,  _L,  _L,  _L,   _L, \
>      _L,  _L,  _L,  _L,  _L,  _L,  _L,   _L, \
>      _L,  _L,  _L,  _L,  _L,  _L,  _L,   _P, \
>      _P,  _L,  _L,  _L,  _L,  _L,  _L,   _L
> 
> i compiled the newlib as it is described in the readme files......
> and got files like "libc.a, libg.a, libm.a"
> those i copied in the path "/lib"
> and the other paths where the old libc.a was found
> and recompiled my testprogram but it had no effect........

The libc.a and libm.a in /lib are actually links to libcygwin.a -
the export library for cygwin1.dll. So what you need is a 
new libcygwin.a in your /lib dir and new cygwin1.dll.

How did you build the newlib package ? As part of cygwin build
process ? If this is the case then both libcygwin.a and cygwin1.dll
should been generated in winsup/cygwin/ - the cygwin1.dll is 
however named new-cygwin1.dll. So at this point you have to copy 
libcygwin.a to /lib and restore the libc.a and libm.a links and
also you have to copy new-cygwin1.dll in /bin/cygwin1.dll. Just
note that to overwrite the dll you have to exit all cygwin apps
including any services you might be runnig.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019