Re: Patch: Multi-encoding Text import/export


Subject: Re: Patch: Multi-encoding Text import/export
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Sat May 19 2001 - 09:46:12 CDT


Sam TH wrote:
>
> On Sat, May 19, 2001 at 06:19:21PM +1000, Andrew Dunbar wrote:
> > I consider this a pretty important change.
> >
> > It allows you to import a text file no matter if
> > it's an old 8-bit encoding, UTF-8, or UCS-2 as is
> > used in Windows and Mac OSX.
> >
> > It also allows you to export to any of these text
> > formats - though changes are needed to the rest of
> > AbiWord to fully support this.
> >
> > This also means we will no longer need separate
> > UTF-8 and UCS-2 importers and exporters and any
> > .txt file will "just work" - perfect for church
> > secretaries (:
> >
> > Please somebody have a serious look at this!
> > Feedback much appreciated.
>
> This looks really good. A couple quick comments:
>
> - _recognizeUCS/UTF8 should definitely be members of class.
> IE_Imp_Text_Sniffer is probably the best choice.
>
> - All the new functions need doxygen comments.

Where can I read about making these?

> Those two you should fix before someone commits this. They shouldn't
> be too hard.
>
> The third thing is that UTF8 can be various-endian as well, so you
> probably want to detect that.

I've actually never heard of this before! Could you direct me
to a URL where I can read about it. I don't really understand
how it could work.

> Question: does our current UTF8 export use a byte-order mark? If not,
> it probably should.

I've allowed for this but it's not there yet as I didn't have
enough information. I do know that the MS world loves BOMs and
the Unix world loathes them.

> Other than that, this is excellent.

Thanks! I've found that we must make the Text Encoding a per-
document feature instead of based entirely on the locale.
I need to know how to add an "encoding" field to AbiWord's
document class - this will also be very useful for at least
the HTML and RTF importers and exporters - probably more.

Andrew Dunbar.

-- 
http://linguaphile.sourceforge.net

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




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