Recent

Author Topic: When we can turn off UTF8 mode and use default system codepage ?  (Read 1469 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: 5275
    • 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: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and 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: 14199
  • Probably until I exterminate Putin.
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 »
Specialize a type, not a var.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • 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!
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018