> But, as the present state allows the use for every character set that
> fits in eight bits, by using (for Plan9 users) tcs(1) to feed TeX with
> what it expects, I will not delay forever the release of 1.0 waiting for
> this next solution.
good grief. how hard is it to write this code!? this bit depends on just a
few simple functions from the plan 9 c library and that can be easily
appropriated, namely chartorune and fullrune, and a user-defined getc.
(not compiled, just dashed off. just an example of how easy this is.)
char
texgetutfchar(void)
{
char ibuf[UTFmax + 1];
int c, utfi;
Rune r;
for(;;){
if(utfi == sizeof ibuf - 1){
itfi = 0;
print("garbage input rejected\n");
}
ibuf[utfi++] = getc();
ibuf[utfi] = 0;
if(fullrune(ibuf, utfi)){
r = chartorune(&r, ibuf);
utfi = 0;
if(r >= 256){
print("codepoint %#.6ux rejected", r);
continue;
}
return (char)r;
}
}
}
- erik