[Expat-discuss] Problems with utf8_toUtf8

Marta Padilla martap@tango04.net
Tue Aug 6 10:47:02 2002


This is a multi-part message in MIME format.

---------------------- multipart/mixed attachment

Hi,

I'm still working to adapt Expat to AS/400. The code has a different
behaviour in following function:

utf8_toUtf8

  if (fromLim - *fromP > toLim - *toP) {
    /* Avoid copying partial characters. */
    for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--)
      if (((unsigned char)fromLim[-1] & 0xc0) != 0x80)

--> WHY 0xc0 and =x80 ??

        break;
  }
  for (to = *toP, from = *fromP; from != fromLim; from++, to++)
    *to = *from;
  *fromP = from;
  *toP = to;

I guess it has something to do with Ascii codes. Can anyone clarify me what
does this function do?

Thanks!
Marta


---------------------- multipart/mixed attachment
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2302 bytes
Desc: not available
Url : http://mail.libexpat.org/pipermail-21/expat-discuss/attachments/20020806/ddd61556/winmail.bin

---------------------- multipart/mixed attachment--