Example for adding unicode support in Delphi

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
JOUBE
Power Member
Power Member
Posts: 1685
Joined: 2004-07-08, 08:58 UTC

Example for adding unicode support in Delphi

Post by *JOUBE »

Is there an example content plugin available, for adding unicode support to an Plugin written in Pascal/Delphi/Freepascal/Lazarus?

Is - on Vista/Win7 systems - allways the WideFunctions (ContentGetValueW) called?

Will it work, to copy in the Ansi-plugin the ansi function to the unicode function (ContentGetValue to ContentGetValueW) and do in the new wide function only two changes:
- returning "ft_stringw"
- Strcopying widestring to the FieldValue
?

JOUBE
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50843
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, it will work, but you need to copy a wide string to the FieldValue if you return ft_stringw. If you want to return an ANSI string, return ft_string.
Author of Total Commander
https://www.ghisler.com
Post Reply