why Delphi 2.0?

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Does some versions of Delphi nativly support unicode?
http://ghisler.ch/board/viewtopic.php?p=73025#73025
I switched to Linux, bye and thanks for all the fish!
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

this not native...

I tried TNT. It is good.
Thx for the other links.
Habemus majkam!
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

AFAIK Delphi (don't know supports Unicode quite well but the Win32 component framework VCL only supports ANSI strings. That's why alternative component packages like TNT could be helpful.
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

SanskritFritz wrote:
Does some versions of Delphi nativly support unicode?
http://ghisler.ch/board/viewtopic.php?p=73025#73025
It looks like Borland is not that into Delphi any more...

2MPS
Thanks for the links!
Lefteous wrote:AFAIK Delphi (don't know supports Unicode quite well but the Win32 component framework VCL only supports ANSI strings. That's why alternative component packages like TNT could be helpful.
Than it eludes me why is it so hard to implement unicode in TC?

I think that Ghisler wrote his own list box control, this would have to be manualy implemented and if unicode VCL exists, would'nt this substantialy reduce time for unicode implementation?
Timeline Ghisler spoke of was two years to implement unicode support??

I still think this is bigest downfall of TC. Rest of the problems discussed here (on forum) are quite minor and they are solved in one whay or another.
This sticks since Unicode story started...
Ambiguity succeeds where honesty dares not venture.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2frenky
Than it eludes me why is it so hard to implement unicode in TC?
Because TC uses VCL extensively and Delphi supports no generic characters.
I think that Ghisler wrote his own list box control
I guess it's just derived from a VCL TCustomListbox control.
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

Because TC uses VCL extensively and Delphi supports no generic characters.
Arent TNT's controls compatilble with those supplied with Delphi?
Sorry if I'm pusthing this, but Delphi is foreign language for me. I'm all about Java... And a bit of C# and VB, and C, and C++ :) OK, I programmed with may languages exept Delphi :D
Ambiguity succeeds where honesty dares not venture.
User avatar
MPS
Junior Member
Junior Member
Posts: 90
Joined: 2004-07-27, 15:57 UTC
Location: Poland
Contact:

Post by *MPS »

Thanks for the links!

don't mention it ;)
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

It looks like Borland is not that into Delphi any more...
Can't be ....
Sorry if I'm pusthing this, but Delphi is foreign language for me. I'm all about Java... And a bit of C# and VB, and C, and C++ OK, I programmed with may languages exept Delphi
You should try Delphi. I know about 15 prog languages and I favor the Delphi... maybe just my weird habit but what I found great about it is it's programming philosophy - U really don't have some "hard to follow" things there... it is like everything is perfectly set... (except UNICODE).

TNT controls are very good. They did UNICODE twin for every common control in DELPHI. So, I guess, Ghisler can just try to change some class inheritance here and there...
Habemus majkam!
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2majkinetor !
TNT controls are very good. They did UNICODE twin for every common control in DELPHI.
But how to keep a single code base (Unicode and ANSI)? Is it possible to compile to either an Ansi or Unicode binary?
How to convert a VCL project into a TNT project?
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

You just switch some names....

Like this:

Original:

Code: Select all

 MyForm = class (TForm)
              MyButton : TButton.... 
TNT:

Code: Select all

 MyForm = class (TNTForm)
              MyButton : TNTButton.... 
Also, in Delphi code U should use some compiler directive that tells him that string default to Wide, not Ansi and if you used PAsniChar U should replace this with PWideChar... It would be the best if you used PChar since it can be changed with single compiler directive again (it defaults to PAnsiChar)

Anyway, this scheme can present unpredictable things if your code depends on string structure..
For instance if you do some operation with strings and somehow iterated through charachters with single buty addition ( p := p + 1 ) then this would create some side effects... In previous little code no, becuase + 1 will add 1 byte for p : PAnsiChar and 2 bytes for p:PWideChar....

But... that's why we have beta tests....
Habemus majkam!
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2majkinetor !
You just switch some names....

Like this:

Original:
Code:
MyForm = class (TForm)
MyButton : TButton....


TNT:
Code:
MyForm = class (TNTForm)
MyButton : TNTButton....
That sounds like some kind of manual refactoring but reasonable.
Also, in Delphi code U should use some compiler directive that tells him that string default to Wide, not Ansi and if you used PAsniChar U should replace this with PWideChar... It would be the best if you used PChar since it can be changed with single compiler directive again (it defaults to PAnsiChar)

Anyway, this scheme can present unpredictable things if your code depends on string structure..
For instance if you do some operation with strings and somehow iterated through charachters with single buty addition ( p := p + 1 ) then this would create some side effects... In previous little code no, becuase + 1 will add 1 byte for p : PAnsiChar and 2 bytes for p:PWideChar....
TNT seems to use WideString not a generic String, right? So how should this work?

Is the components set really complete? It seems the components from the "Win 3.1" tab are missing. Some of them are used in TC.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TNT sounds very promising. Is it still possible to have a single executable both for Windows 2000/XP and Windows 9x/ME (which don't support most Unicode functions)? Currently I call different parts of code, e.g. for displaying Unicode names in the file list, or in shift+F6 rename.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Is it still possible to have a single executable both for Windows 2000/XP and Windows 9x/ME (which don't support most Unicode functions)?
Why not split TC in two different executables: ANSI and Unicode version? Many program writers do so (first can be run on Win9x & WinNT kernels, second on WinNT only). If this will simplify programming, I think, it worth doing it.

Added:
When I wrote this post, I didn't see the Lefteous's reply...
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

TNT seems to use WideString not a generic String, right? So how should this work?
Is the components set really complete? It seems the components from the "Win 3.1" tab are missing. Some of them are used in TC.
Yes, it uses WideStrings for all string controls like Caption, Text etc...

"How should this work" question is not about TNT but your code. If you use some "not very smart" coding with strings which I doubt is possible with Delphi since its pointers are not C-like flexibile you can get errors. For instance, you could hard coded "string walk" with one byte steps so when U tell compiler that your strings are acctualy wide, one byte steps will enter "charachter in middle" since chars are now 2 bytes :). Like I said, as my Delphi practice goes, you realy must have weird programming techniques to produce such behavior in Delphi since it is strongly typed.

I cant answer your "Win 3.1" question, since I don't care, and I can't care less about 16bit TC. Developement of 16bit TC should stop at the current stage. No harm done, since at current level, users of 16bit TC will have too good application for Win 3.1 system, so no upgrades are needed. I don't know why Ghisler is wasting time with this when more urgent requests are isued on this forum, like this one, line numbers, icons etc...
Habemus majkam!
Post Reply