[Lazarus] Lazarus (UTF8) and Windows: SysToUTF8, UTF8ToSys... Is there a better solution?

Marco van de Voort marcov at stack.nl
Wed Dec 25 18:08:14 CET 2013


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.

Since that means typically two per target, it was suggested to combine this
using 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)

> 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.




More information about the Lazarus mailing list