it failed to cover the case where high bits of char are 100 or 101.
Not sure if fix is right, but it agrees with pg_utf_mblen ... and it
doesn't lock up ...
/*
* conversion functions between pg_wchar and multi-byte streams.
* Tatsuo Ishii
- * $Id: wchar.c,v 1.6 1999/03/24 07:02:17 ishii Exp $
+ * $Id: wchar.c,v 1.7 1999/04/25 20:35:51 tgl Exp $
*/
#include "mb/pg_wchar.h"
*to |= c2 << 6;
*to |= c3;
}
+ else
+ {
+ *to = *from++;
+ len--;
+ }
to++;
}
*to = 0;