This is the mail archive of the cygwin-developers@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]

Re: isspace() & i18n


On Wed, May 30, 2001 at 06:11:56PM +0400, egor duda wrote:
>Hi!
>
>Wednesday, 30 May, 2001 Christopher Faylor cgf@redhat.com wrote:
>
>CF> On Wed, May 30, 2001 at 02:57:56PM +0400, egor duda wrote:
>
>>>  cygwin calls newlib's isspace() passing it a signed char. this works
>>>ok for ascii symbols 0x00-0x7f, but fails with, say, cyrillic symbols
>>> with codes > 0x80. As a result `cd dir-with-last-cyrillic-letter'
>>>fails as chdir strips last symbols, thinking they're spaces --
>>>isspace() is called with negative parameter.
>>>
>>>Any thoughts as of how we should handle this?
>
>CF> Maybe we just need a cygwin_isspace which checks for just tabs and spaces?
>
>it's possible, of course, but the problem with referencing negative
>array indices in is*() remains.
>
>i think we should either conform to standard and explicitly convert
>types or define appropriate strings as unsigned char*, (typedef PATH_STR,
>perhaps), or define cygwin_is*() as macros that do the conversion, or,
>as glibc does, expand _ctype to allow indices in range [-128,256].

IMO, "we" should convert the arguments to the is* functions to unsigned
char.  This is a decision for the newlib folks though, isn't it?

cgf


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