+ /*
+ FIXME, this is apparently locale dependent.
+ */
+#if HAVE_MBRTOWC
+ size_t thislen = mbrtowc (multibyte, line_chars, left, &state);
+#else
+ size_t thislen = 1;
+#endif /* !HAVE_MBRTOWC */
+
+ /* Stop converting at invalid character;
+ this can mean we have read just the first part
+ of a valid character. */
+ if (thislen == (size_t) -1)
+ break;
+
+ /* We want to handle embedded NUL bytes
+ but the return value is 0. Correct this. */
+ if (thislen == 0)
+ thislen = 1;
+
+ if (thislen == 1 && line_chars[0] == '\t')
+ (*column) = (*column / 8 + 1) * 8;
+ else
+ (*column)++;
+
+ (*line_char)++;
+ /* Advance past this character. */
+ line_chars += thislen;
+ left -= thislen;
+ }