Re: Unicode UCS-2 importer


Subject: Re: Unicode UCS-2 importer
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Tue May 15 2001 - 04:52:13 CDT


Hi Andrew,

I have had a quick look at the importer and overall it looks good,
but I would be much happier if we could do without the goto
construct, something like

if( error = _writeHeader(fp) == UT_OK)
{
        error = _parseFile(fp);
}
fclose(fp);
return error;

Also, if the file does not contain a BOM marker, the exporter
assumes the file is little-endian. Should we not, assume the
opposite, since, if I am not mistaken, Unicode is bigendian by
definition.

Tomas

> Here is my first attempt at an importer for UCS-2.
>
> This is the native Unicode encoding on Windows 2000 and newer
> as produced by Notepad and MSWord. It handles little-endian
> and big-endian UCS-2 and Microsoft's BOMs.
>



This archive was generated by hypermail 2b25 : Sat May 26 2001 - 03:51:04 CDT