On Sun, 30 Dec 2007 20:04:51 +0100
Mattias Gaertner <[EMAIL PROTECTED]> wrote:

> On Sun, 30 Dec 2007 20:14:15 +0300
> "Vasily I. Volchenko" <[EMAIL PROTECTED]> wrote:
> 
> > OK, here is another patch. It allows to work (or just import or
> > export) files with different encodings. All you need is to add
> > {&encoding=<...>} (tested with <...>=cp1251 and koi8-r) to any place
> > of the source. As for delphi import, I made some work, but presently
> > delphi import works not good enough (in the original).
> > 
> > "By effects" (can be both bugs and features):
> > 1. String constants with '{&encoding=' are treated as a "signal". I
> > had a trouble with lazarus source, but I have fixed this there
> > (breaking a string helps). 2. LFM files sometimes are reasonable to
> > save in "foreign" encoding. They have no comments, besides. This can
> > be overcame (!!!) by including such a string constant (may be a hint
> > of a unusable component) as '{&encoding=<...>} 3. GTK1 is not
> > supported, as it is an exception (not a windows, not a UTF8).
> > 
> > Seems to be great for me, and can restore win32 compatibility.
> > (This have nothing common with strings loading. May be reasonable to
> > test with 1-byte encoding text loading in strings with a
> > hacked .lfm/.lrs file)
> 
> I renamed the lconv to lconvencoding and added a license header. Ok?

The conversion functions are pretty slow and only support 2 codepages.
Maybe some parts of the cwstring unit can be used/improved to use
the iconv lib directly.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to