Recent

Author Topic: When we can turn off UTF8 mode and use default system codepage ?  (Read 460 times)

cedo.home

  • Newbie
  • Posts: 2
I want to know when Lazarus will support the development of programs which are dependent on system code page. In FPC3.0 to disable the new UTF-8 mode we can use -dDisableUTF8RTL switch. But LCL controls like TLabel, TEdit, TMemo etc. use the UTF8 strings further.

For more information you can find here: http://wiki.freepascal.org/Lazarus_with_FPC3.0_without_UTF-8_mode

What are your plans?

Bart

  • Hero Member
  • *****
  • Posts: 3452
    • Bart en Mariska's Webstek
Re: When we can turn off UTF8 mode and use default system codepage ?
« Reply #1 on: April 23, 2019, 10:25:52 pm »
AFAIK Lazarus/LCL will remain UTF8.
This may change when fpc (compiler, rtl, all packages) will be fully delphi compatible  (string is unicodestring).
When using default system codepage, your application can never be fully unicode enabled.

Bart

lucamar

  • Hero Member
  • *****
  • Posts: 1829
Re: When we can turn off UTF8 mode and use default system codepage ?
« Reply #2 on: April 23, 2019, 11:36:41 pm »
Note also that slowly (as in "continental-drift") but surely most OSs are moving towards full-unicode by default.

Anyway the unique problem-areas you may have would be in the interface OS<->Application (and physical file<->application) and those are relatively easy to isolate and add an intermediate string-conversion step.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4 & 2.0.2 w/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

cedo.home

  • Newbie
  • Posts: 2
Re: When we can turn off UTF8 mode and use default system codepage ?
« Reply #3 on: April 26, 2019, 11:52:35 am »
Have you ever wondered why the default code page in Delphi is the system code page. The answer is simple: legacy code.

Thaddy

  • Hero Member
  • *****
  • Posts: 8203
Re: When we can turn off UTF8 mode and use default system codepage ?
« Reply #4 on: April 26, 2019, 02:25:49 pm »
Have you ever wondered why the default code page in Delphi is the system code page. The answer is simple: legacy code.
This is not true. There's more than windows and even linux made a bad choice...
Anything can be expressed in ASCII-7. The rest are esoterics that simply hinder programmers.
Everything after O is not needed... The ancient Greeks were right...And the Chinese at least consistent...
I personnaly like the Mayan knot. One knot and whitespace.. ;D :-X :P or Morse...
« Last Edit: April 26, 2019, 02:29:26 pm by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: When we can turn off UTF8 mode and use default system codepage ?
« Reply #5 on: April 26, 2019, 04:43:23 pm »
cedo.home, Windows has supported full Unicode since Win2000, almost for 20 years.
The system code page is a historical remain and causes serious problems for international applications. You should get rid of it ASAP!