Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#639 closed defect (fixed)

Assertion in <ctype.h> functions with Visual Studio 2005 when handling non-ASCII characters (e.g. UTF-8)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.0-rc3
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

With Visual Studion 2005 and possibly later, the ctype.h functions such as isdigit() will raise assertion error if given input with ASCII > 127 character. This is because the functions takes int argument, and ASCII character > 127 will be represented as negative value.

Change History (2)

comment:1 Changed 16 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r2302:

  • changed the function arguments to unsigned char

comment:2 Changed 16 years ago by bennylp

  • Summary changed from Assertion in <ctype.h> functions with Visual Studio 2005 when handling non-ASCII characters to Assertion in <ctype.h> functions with Visual Studio 2005 when handling non-ASCII characters (e.g. UTF-8)

In r2307:

  • fixed warning with gcc about comparison always true
Note: See TracTickets for help on using tickets.