[Expat-bugs] [ expat-Bugs-1023646 ] Error in codepageMap, codepage.c

SourceForge.net noreply at sourceforge.net
Tue Sep 7 14:39:50 CEST 2004


Bugs item #1023646, was opened at 2004-09-07 05:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1023646&group_id=10127

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error in codepageMap, codepage.c

Initial Comment:
Applies to expat v.1.95.8

>From MS:

"LeadByte:
Specifies a fixed-length array of lead-byte ranges, 
where the number of lead-byte ranges is variable. If 
there are no lead bytes in this code page, then every 
element of the array is NULL. If there are lead bytes in 
this code page, a starting value and ending value is 
specified for each range. Ranges are inclusive. The 
maximum number of lead-byte ranges for any code page 
is five. The array uses two bytes to describe each 
range, with a double-byte null terminator after the last 
range."

Note that "Ranges are inclusive". Therefore the function 
codepageMap should be changed:

for (i = 0; i < MAX_LEADBYTES; i+=2) 
{
  int j, lim;
  if (info.LeadByte[i] == 0 && info.LeadByte[i + 1] == 0) 
    break;
  lim = info.LeadByte[i + 1];
  for (j = info.LeadByte[i]; j <= lim; j++) map[j] = -2;
}

Regards,
Ole Stauning, spam at uning.dk


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1023646&group_id=10127


More information about the Expat-bugs mailing list