On Sat, 24 Nov 2007 19:58:54 +0300
"Vasily I. Volchenko" <[EMAIL PROTECTED]> wrote:

> > About autoconversion:
> > 
> > Changing the encoding of text files is pretty easy. For example: use
> > the 'recode' tool. An alternative would be to extend the IDE to
> > load/save files of other encodings and extend the compiler to auto
> > convert the strings.
> > After that you must check all places, where fixed visual character
> > widths are used. In lazarus only synedit and parts of the widgetsets
> > were affected. So, although is not difficult, this part can not be
> > done automatically.
> Yes, this may be a problem. This is another argument to make a
> compatibility mode.

Some notes about compatibility mode:

- gtk1 supports system encodings and only if the environment is
setup correctly. AFAIK all major distros are now using UTF-8. So,
compatibility mode can be only: use gtk1 and setup the right language.

- gtk2 only supported UTF-8.

- qt, carbon, fpgui, wince: they are too new, so they don't need to.

- win32/64: 
ATM you need to compile with -dWindowsUnicodeSupport to get UTF-8.
As soon as the last bug is fixed the default will be UTF-8 and you have
to compile with -dDisableWindowsUnicodeSupport (or something like that)
to get the old situation. This means you can not switch at runtime, nor
can you do both encodings at the same time. If you want both LCLs, then
you probably need two copies of the LCL.

 
> > >> [...]instead of having 2 sets of components for each encoding,
> > > > Ansi and UTF16 and options to use UTF8 instead
> > > > of Ansi,
> > >[...]
> > > (you must be sure, both students and
> > > post-graduates will be strongly disappointed if they will see
> > > English messages, and they will be disappointed much more if they
> > > would see somewhat like ЪЪЪЦЪЪЪЪЪЪ). 
> > 
> > This is the current situation (as soon as you switch to another OS).
> > That's exactly what the switch to one encoding should fix.
> Should fix. Only if such text is not placed directly. 

I meant, new programs or updated old ones will not have the
problem any more.


> > It will reasonably work. For example you can not expect that the
> > current windows font supports all languages. But this can not be
> > fixed by the LCL anyway.
> And this code SHOULD work good 
> (this is a bad code for international projects, but a real code for
> small national projects). If you say that this code won't be
> supported anyway, I will prefer old good versions (or patched
> current).

Yes, I think it should be said clearly: no one likes to break
compatibility, but we lack the manpower to support several encodings.
Lazarus already supports more platforms than it has developers.
Nevertheless I will help writing tools for porting old code
and extending the IDE to load/save text files in different encodings.
But I'm not an expert in local encodings, so I need some help here.
I will use your lconv.pas as a start and start a new thread.

 
> > 
> > > And the same will
> > > be with Application.MessageBox? If you are, how will it be with
> > > those who have a tons of code (easily converted to UTF8, as you
> > > say) full with Windows.MessageBox(Handle,...) which means
> > > MessageBoxA?
> > 
> > AFAIK the call to Windows.MessageBox is not the problem, but the non
> > UTF-8 strings stored in databases.
> If stored - yes. If not - no. Will you store any message in "quickly
> made" application? 
> > Conclusion:
> > Switching to UTF-8 means writing i18n programs becomes much easier
> > and writing system specific programs becomes harder. It breaks
> > compatibility. Some people would like a simple switch and that the
> > LCL should support both, but lazarus has not the man power to
> > support this.
> > 
> This switch is quite simple...

I think it is not that simple.
The LCL must run in one encoding. All devels will only use the unicode
'mode'. The platform independent code is and will be written only for
UTF-8.


> Besides, my recoding "work around" - encoding conversion application
> for the whole directory (from prev.post)

Great.

Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to