[Lazarus] Beyond Compare 4 built with Lazarus 1.2
Jürgen Hestermann
juergen.hestermann at gmx.de
Tue Dec 31 17:16:05 CET 2013
Am 2013-12-31 14:49, schrieb Juha Manninen:
> As I replied
> to Marcos Douglas, this same discussion and complaining has continued
> in FPC mailing lists for ~ 4 years.
It seems there is a reason for this.
>> ShowMessage(Trim(SysToUTF8(SysErrorMessage(GetLastError))));
> LazUtils has SysErrorMessageUTF8() which is identical to your wrapper
How should I know?
It is not mentioned in the documentation for SysErrorMessage.
(I know these are different projects but this doesn't make it less annoying).
When searching for "Error Message" I only find SysErrorMessage but not SysErrorMessageUTF8.
Otherwise I would have used it.
I cannot (and do not want to) ask in this forum for each and
every function whether alternatives exist.
I was hoping for a valid documentation about them with a "see also" rubric.
There are so many libraries around each repeating similar functionality
(though with slight differences) that it becomes hard to get an overview.
I as a former Turbo Pascal/Delphi user tend to forget that everything
is split into multiple independent projects which all use their own standards.
> BTW, trailing spaces and tabs are not part of the character encoding problem.
True. I never said this.
> Lazarus offers a working UTF-8 solution.
> If you need a solution now, please use it, otherwise wait for the coming FPC solution.
It is much easier for me to use the WIN-API directly and write my own wrappers.
Searching for existing solutions seems to require more time and still often does not fit my needs.
>> How else should a user find out about this?
> By learning once that a "string" currently means AnsiString with
> System-ANSI-encoding.
Yes, I now remember why I abandoned the use of FPC internal
functions that use STRING years ago:
ANSI = WIN-ANSI-API = max path length 255 and non-Unicode.
So completely useless today.
I have to remind myself to avoid functions that use STRING (if I recognize them).
> Michael Van Canneyt also tried to explain it to you.
> Once you know it, the documentation does not need to repeat the same
> thing always when "string" is used.
Well, meanwhile I am so accustomed to use UTF8 that I find it hard to
remember that STRING still means this old ANSI encoding type.
It is also not easy to find out that functions use STRING
because this word has been wiped out in the documenation.
> It also does not explain "integer" every time an "integer" is used.
Bad enough.
A link to an explanation would help so many people.
But it seems the documention is only for those people
who already know everything about FPC/Lazarus.
More information about the Lazarus
mailing list