Preliminary information about Unicode support (TC7.5)
Moderators: Hacker, petermad, Stefan2, white
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
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?
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
#128099
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
There is no ft_fulltextw at this time, sorry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
2ghisler(Author)
For standard plugin I can return ft_string like:
How to do that for Unicode?
Will it be correct for ft_stringw?
I think I will wait for more samples
For standard plugin I can return ft_string like:
Code: Select all
//tmpval as std::string
strlcpy((char*)FieldValue, tmpval.c_str(),maxlen-1);
Will it be correct for ft_stringw?
Code: Select all
//tmpval as std::wstring
wcscpy((wchar_t*)FieldValue, tmpval.c_str(),maxlen-1);
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...
#128099
#128099
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, when you return a Unicode string, return ft_stringw.
However, the correct copying call is like this:
Note the /2 because "maxlen" is the size in bytes, not in characters for any type of field.
However, the correct copying call is like this:
Code: Select all
wcscpy((wchar_t*)FieldValue, tmpval.c_str(),maxlen/2-1);
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Power Member
- Posts: 556
- Joined: 2006-04-01, 00:11 UTC
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will make an announcement shortly here in the plugins forum.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Power Member
- Posts: 556
- Joined: 2006-04-01, 00:11 UTC
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
https://www.ghisler.com
That's great to hear!ghisler(Author) wrote:Yes, ft_fulltextw has been added in November 2014(!).
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
2ghisler(Author)
2milo1012
http://www.ghisler.ch/board/viewtopic.php?p=297896#297896
Great!Yes, ft_fulltextw has been added in November 2014
2milo1012
As far as I understood this should be part of the already confirmed features for TC 9.Is it possible to add all wdx fields with full text search to the search dialog's main tab?
http://www.ghisler.ch/board/viewtopic.php?p=297896#297896
Does this mean the WDX API version was incremented?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Yes, but I think we need to see this in action.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
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
2milo1012
Sure.Yes, but I think we need to see this in action.
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.Judging from the description it seems to be combined with Office/XML search, which might not exactly be what I meant.