/* XXX - This may be possible with iconv or similar  */
static int iseries_UNICODE_to_ASCII(guint8 *buf, guint bytes)
/* XXX - This may be possible with iconv or similar  */
static int iseries_UNICODE_to_ASCII(guint8 *buf, guint bytes)
{
  guint   i;
  guint8 *bufptr;
  bufptr = buf;
  for (i = 0; i < bytes; i++)
    {
      switch (buf[i])
        {
          case 0xFE:
          case 0xFF:
          case 0x00:
            break;
          default:
            *bufptr = buf[i];
            bufptr++;
        }
      if (buf[i] == 0x0A)
        return i;
    }
  return i;
}