On Sun, 25 Nov 2007 15:03:18 +0300 "Vasily I. Volchenko" <[EMAIL PROTECTED]> wrote:
> > - When a TCodeBuffer loads a file it must find out the encoding, > > convert it to UTF-8 and on saving convert it back. > OK, this patch may be a start. Course, lconv should be either > extended or changed to something more suitable. Presenlty I am > checking only the first line Thanks. TStringlist is too slow and the conversion should not be part of codetools. The widgetsets have the best access to the system libs, so they have the best encoding converters. I can do that part. The difficult part is to find out the encoding of a text file. Your proposal of the //&encoding comment has the advantage of comments. Because this is a lazarus feature I suggest to use IDE directives style comments: {%encoding xxx}. What about all the existing pascal files (e.g. coming from delphi)? Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives