[Lazarus] no lazutils in 0.9.30.2
jesusrmx at yahoo.com.mx
Wed Nov 16 02:42:04 CET 2011
--- El mar 15-nov-11, Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com> escribió:
> De: Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com>
> Asunto: Re: [Lazarus] no lazutils in 0.9.30.2
> A: "Lazarus mailing list" <lazarus at lists.lazarus.freepascal.org>
> Fecha: martes, 15 de noviembre de 2011, 7:08
> In Lazarus 0.9.30.2 or inferior you
> can use the UTF-8 routines from
> the unit LCLProc which is inside the LCL.
> In 0.9.31+ they are all still there, but are now call
> LazUtils to do
> the real work, so code which uses LCLProc is compatible
> with a wide
> range of Lazarus versions.
> Felipe Monteiro de Carvalho
Something related to Lasutils, it seems that all windows snaphots that use 0.9.31 and fpc 2.5.1 are broken since r33116 or r32982, this problem it seems, not fixed by r33538 (bug report http://bugs.freepascal.org/view.php?id=20668).
The problem is that Wide2AnsiMove should convert from widestring to ansi, but the conversion is conditionated by PASWSTRING_SUPPORT_NONUTF8_ANSISTRING which is undefined by default, as result, in UTF8ToAnsi that does a UTF8->UTF16->UTF8->Ansi doesn't work as the last step is not done :D.
As result UTF8toAnsi does only UTF8->UTF16->UTF8, and this function is used by lazarus to convert a UTF8 path to ansi in order to save configuration files, in localized windows version like spanish where the config path is like: c:\Documents and Settings\user\Configuración local\Datos de programa\lazarus it fails as it tries the UTF8 version of the path. As said, this occurs for 2.5.1 and 0.9.31.
BTW, what strange conversion UTF8->UTF16->UTF8->Ansi too many steps.
Jesus Reyes A.
More information about the Lazarus