In message < .com>,
writes
>Hi. I'm having trouble reading some unicode files. Basically, I have to
>parse certain files. Some of those files are being input in Japanese,
>Chinese etc. The easiest way, I figured, to distinguish between plain
>ASCII files I receive and the Unicode ones would be to check if the
>first two bytes read 0xFFFE.
>
>But nothing I do seems to be able to do that.
>
>I tried reading it in binary mode and reading two characters in:
>
>FILE *fin; char ch [2];
>fin.open (filename, "rb");
>if (fin) { fopen (ch, sizeof (char), 2, fin); ......
Try posting the *actual* code that causes the problem. The above is
clearly not it.
--
Richard Herring