[Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?
Marcos Douglas
md at delfire.net
Wed Dec 25 19:18:53 CET 2013
On Wed, Dec 25, 2013 at 3:08 PM, Marco van de Voort <marcov at stack.nl> wrote:
> On Wed, Dec 25, 2013 at 09:57:05AM -0200, Marcos Douglas wrote:
>> >
>> > The mode concept is all good and well, but here it breaks down... :(
>>
>> So, if the {mode} continue to be a way, I think it should be used on
>> "platform level", not per "unit level".
>
> That was the original proposal from me. Add encoding to the target. (so
> i386-linux-utf8) and make a distro per target. Call them appropriately.
>
> Encoding wise there are three options:
>
> - ansi
> - utf8
> - utf16
>
> but not all options are relevant for all targets. E.g. most *nix are utf8,
> so it wouldn't make sense to make an ansi port. Windows does not support
> utf8, so only ansi and utf16 would make sense.
Make sense.
> Since that means typically two per target, it was suggested to combine this
> using dotted unit functionality.
I did not understand this... dotted unit functionality?
> Keeping it in the same distribution at least gives hope of keeping encoding
> agnostic units shared, but that required compiler extensions nobody started.
> (I personally don't see the benefit in this)
... you mean 3 compiled units (ansi, utf8 and utf16) using dotted unit
names functionality?
>> Even if the programmer can to change this, he will change in all code.
>> Thinking better, this is to be used on compiler level, not source
>> level.
>
> Something like that, but not compiler, but unit directory on a per project
> basis. Or dotted unit prefix in the dotted alternative.
Maybe I did not understand:
Using only directories or per project we have the same problem that
use {mode} directive, ie, TStringList could be compiled using utf-16
by default, the programmer inherit this class and compile your own
directory or project using utf-8... something will break.
Marcos Douglas
More information about the Lazarus
mailing list