On Nov 25, 2007 1:42 PM, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> 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.
Isn't AnsiToUtf8 enougth? This way we don't depend on any external libs.
A simple loop using ReadLn and WriteLn should be enougth.
> 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}.
The best option would be using the standard way which any editor
should recognize: BOM
But we can't use that until the widestring manager is improved.
Using a comment will cause trouble opening the file on other editors
which are prepared to handle the standard.
--
Felipe Monteiro de Carvalho
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives