Preliminary information about Unicode support (TC7.5)

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

Moderators: Stefan2, white, sheep, Hacker

Post Reply
User avatar
fenix_productions
Power Member
Power Member
Posts: 1953
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions » 2009-04-06, 12:06 UTC

2ghisler(Author)
Are there any chances to provide sample Unicode plugin with ft_string, ft_stringw fields?

What about ft_fulltext? Does it also support Unicode?

SDK help file says that length of returned value is maxlen-1 in that case. How is it reflected in Unicode case? Half of it for UTF-16?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099

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

Post by *ghisler(Author) » 2009-04-06, 15:14 UTC

You can return either ft_string or ft_stringw, Total Commander will accept both for one string field. Just make sure to test for the version number of the plugin interface before returning ft_stringw.

There is no ft_fulltextw at this time, sorry.
Author of Total Commander
http://www.ghisler.com

User avatar
fenix_productions
Power Member
Power Member
Posts: 1953
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions » 2009-04-06, 15:51 UTC

2ghisler(Author)
For standard plugin I can return ft_string like:

Code: Select all

//tmpval as std::string
strlcpy((char*)FieldValue, tmpval.c_str(),maxlen-1);
How to do that for Unicode?

Will it be correct for ft_stringw?

Code: Select all

//tmpval as std::wstring
wcscpy((wchar_t*)FieldValue, tmpval.c_str(),maxlen-1);
I think I will wait for more samples ;)
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099

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

Post by *ghisler(Author) » 2009-04-07, 19:51 UTC

Yes, when you return a Unicode string, return ft_stringw.

However, the correct copying call is like this:

Code: Select all

wcscpy((wchar_t*)FieldValue, tmpval.c_str(),maxlen/2-1);
Note the /2 because "maxlen" is the size in bytes, not in characters for any type of field.
Author of Total Commander
http://www.ghisler.com

Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

Post by *Postkutscher » 2009-04-16, 17:30 UTC

2ghisler(Author)
When the new plugin writer`s guide will be available?

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

Post by *ghisler(Author) » 2009-04-16, 20:41 UTC

I will make an announcement shortly here in the plugins forum.
Author of Total Commander
http://www.ghisler.com

Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

Post by *Postkutscher » 2009-04-16, 22:11 UTC

Here it is. I see.

Thank you! :)

User avatar
Lefteous
Power Member
Power Member
Posts: 9457
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2014-09-21, 19:22 UTC

2ghisler(Author)
There is no ft_fulltextw at this time, sorry.
Any news on this?

User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 849
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA » 2016-01-14, 20:30 UTC

2ghisler(Author)
There is no ft_fulltextw at this time, sorry.
Is this planned for 9.0 version maybe?
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..

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

Post by *ghisler(Author) » 2016-01-18, 10:03 UTC

Yes, ft_fulltextw has been added in November 2014(!). Unfortunately I just can't release TC9 yet because the expectations are too high. There is still a lot to add.
Author of Total Commander
http://www.ghisler.com

User avatar
milo1012
Power Member
Power Member
Posts: 1096
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 » 2016-01-18, 18:54 UTC

ghisler(Author) wrote:Yes, ft_fulltextw has been added in November 2014(!).
That's great to hear!
Is the encoding in UTF-16 or UTF-8 format?

Also, as I already suggested here:
Is it possible to add all wdx fields with full text search to the search dialog's main tab?
It would make an easier access, and shows the user some alternate engine immediately.
TC plugins: PCREsearch and RegXtract

User avatar
Lefteous
Power Member
Power Member
Posts: 9457
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2016-01-19, 07:46 UTC

2ghisler(Author)
Yes, ft_fulltextw has been added in November 2014
Great! :-)

2milo1012
Is it possible to add all wdx fields with full text search to the search dialog's main tab?
As far as I understood this should be part of the already confirmed features for TC 9.
http://www.ghisler.ch/board/viewtopic.php?p=297896#297896

User avatar
tbeu
Power Member
Power Member
Posts: 1256
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu » 2016-01-19, 13:38 UTC

Does this mean the WDX API version was incremented?
TC plugins: Autodesk 3ds Max Preview, Autodesk Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, SolidWorks Preview and more

User avatar
milo1012
Power Member
Power Member
Posts: 1096
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 » 2016-01-19, 13:42 UTC

Lefteous wrote:As far as I understood this should be part of the already confirmed features for TC 9.
http://www.ghisler.ch/board/viewtopic.php?p=297896#297896
Yes, but I think we need to see this in action.
Judging from the description it seems to be combined with Office/XML search, which might not exactly be what I meant.

In any case, good to see progress in this matter.
TC plugins: PCREsearch and RegXtract

User avatar
Lefteous
Power Member
Power Member
Posts: 9457
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2016-01-19, 14:34 UTC

2milo1012
Yes, but I think we need to see this in action.
Sure.
Judging from the description it seems to be combined with Office/XML search, which might not exactly be what I meant.
It somehow must be 'combined' with 'Office xml'. There must be some kind of mechanism how to search for file contents. If you want to search text in docx files you have to define if you want to use the internal mechanism or for example using the "TextSearch" plugin.

Post Reply