[Lazarus] I cannot use System.Length() to calculate visible width of string, now !

"Андрей Гусев (Andrey Gusev)" ag888 at rambler.ru
Mon Jun 23 12:14:16 CEST 2008


Mattias Gaertner пишет:
> On Fri, 20 Jun 2008 13:23:04 +0400
> "Андрей Гусев (Andrey Gusev)" <ag888 at rambler.ru> wrote:
>
>   
>> Felipe Monteiro de Carvalho пишет:
>>     
>>>> Solution is clean: i must use check ifdef'ed WindowsUnicodeSupport
>>>> to choice between UTF8Length()/Length(). But maybe it already
>>>> implemented as universal and conventional solution.
>>>>     
>>>>         
>>> Why do you want to support disabled WindowsUnicodeSupport?
>>>
>>>   
>>>       
>> Caption strings in some forms of my project must be defined
>> dynamically. 
>>     
>
> Do you mean like this:
> http://wiki.lazarus.freepascal.org/Translations_/_i18n_/_localizations_for_programs#Translating_Forms.2C_Datamodules_and_Frames
>
>   
Not.
I alreary rework my code generation scripts to get UTF8-sources.
>   
>> Unit code, responsible to these strings definition and
>> visible elemsnts dosposal, is universal and low-level.
>> I wouldn't like make assumtions  about  strings encoding in that
>> code. That is my problem.
>> Have Lasarus way to solve it ?
>>     
>
> Why not use only UTF-8 like the IDE?
>
>   
I wish to save maxumum compatibility level to (probably) backporting to 
Delphi.
Yes, yes, i must use {$ifdefs}.




More information about the Lazarus mailing list