You are not logged in.
Pages: 1
There is a problem compiling 32Bit mORMot2 with Rad Studio 10.4.2
Errror: [dcc32 Fehler] xxxx.pas(196): E2251 Doppeldeutiger überladener Aufruf von 'UTF8ToString'
System.pas(40375): Verwandte Methode: function UTF8ToString(const RawByteString): string;
mormot.core.unicode.pas(3896): Verwandte Methode: function Utf8ToString(const UTF8String): string;
actual i put mormot.core.unicode.UTF8ToString( in my code but i have a lot of code with UTF8ToString
Is there a easy solution ?
System.pas is included in any unit or ?
Rad Studio 12.3 Athens
Offline
i testet something:
there was a former Version of mormot.core.unicode.pas without generating the error:
/// convert any UTF-8 encoded String into a generic VCL Text
// - it's prefered to use TLanguageFile.Utf8ToString() in mORMoti18n,
// which will handle full i18n of your application
// - it will work as is with Delphi 2009+ (direct unicode conversion)
// - under older version of Delphi (no unicode), it will use the
// current RTL codepage, as with WideString conversion (but without slow
// WideString usage)
function Utf8ToString(const Text: RawUtf8): string;
{$ifdef HASINLINE}inline;{$endif}
/// convert any UTF-8 encoded buffer into a generic VCL Text
Rad Studio 12.3 Athens
Offline
as Solution you should not overload the function and instead rename the second Function e.g to Utf8ToStringP
/// convert any UTF-8 encoded String into a generic VCL Text
// - it's prefered to use TLanguageFile.Utf8ToString() in mORMoti18n,
// which will handle full i18n of your application
// - it will work as is with Delphi 2009+ (direct unicode conversion)
// - under older version of Delphi (no unicode), it will use the
// current RTL codepage, as with WideString conversion (but without slow
// WideString usage)
function Utf8ToString(const Text: RawUtf8): string; // itSDS overload;
{$ifdef HASINLINE}inline;{$endif}
/// convert any UTF-8 encoded String into a generic VCL Text
procedure Utf8ToStringP(const Text: RawUtf8; var result: string); // overload;
{$ifdef HASINLINE}inline;{$endif}
what do you think
Last edited by itSDS (2021-07-13 17:32:10)
Rad Studio 12.3 Athens
Offline
Yes, FPC has no trouble with it, and early versions of Delphi.
Please check https://github.com/synopse/mORMot2/comm … e82e257780
Offline
ty it works
Rad Studio 12.3 Athens
Offline
Pages: 1