Messages - losiek [ switch to compact view ]

Pages: [1] 2next
1
FARR Plugins and Aliases / Re: Locate32 Plugin for FARR by Okke
« on: December 30, 2007, 02:19 PM »
Armando:
No, I don't think that yours bugs are caused directly by lack of Unicode support, but I think that they're related. It seems that your bug work very similar to my ' (accent) bug. Can you check Location column in "loc +" results? Are there two (or more) paths for one file?

f0dder:
OK, so everybody is waiting now for your Unicode plug-in. Let's hope it will resolve other bugs also :) Good luck.

2
FARR Plugins and Aliases / Re: Locate32 Plugin for FARR by Okke
« on: December 29, 2007, 08:15 PM »
f0dder:
OK, so everything I know at the moment:
1. Console in Windows XP can produce full Unicode output but only for displaying. Piping and redirecting is unsupported so it's useless for us.
2. Standard printing functions like wprintf (used in locate.exe) uses built-in WideCharToMultibyte conversion (to DOS codepage in my case), so polish letters have wrong hexcodes in normal windows.
3. I'm able to write raw Unicode to console (swprintf+WriteFile, without widechar->codepage conversion) - when displaying it look like there are spaces between all letters, but after redirecting to a file it works like a charm (even without BOM :) ).

So everything we need now is widechar implementation of Locate plug-in. I don't have Delphi so I can't play with that :( Anybody have seen Okke recently? Maybe you have enough time to make plug-in with integrated Locate :)

Armando:
I think it's unresolvable at the moment. We have to wait for fixes or full Unicode version of this plug-in.

3
FARR Plugins and Aliases / Re: Locate32 Plugin for FARR by Okke
« on: December 29, 2007, 04:07 PM »
I'm having trouble building it though, but I guess building your foundation-class-thingy library and adding it to %INCLUDE and %LIBS will fix that :)
If you still have problems with compling this - download source from this page: http://locate32.net/content/view/20/33/. It has necessary 3rd party libs and headers needed for compilation.
I played a little with writing results to a file and I finally forced locate to write in full Unicode:) But I'm rather inexperienced programmer and I used some dirty tricks to achieve that.
Maybe someone in the future will write a plug-in that gets results directly from Locate database;) On the other hand - we *just* have to wait until FARR will have built-in indexing. That will make this plug-in unnecessary... to beautiful to be real. ;)

EDIT:
I'm soo lame :/ (or maybe Windows is?) In order to write wide characters correctly file need to be opened in binary mode. Then fwprintf works perfectly. No dirty hacks are needed.

4
FARR Plugins and Aliases / Re: Locate32 Plugin for FARR by Okke
« on: December 28, 2007, 07:15 PM »
@f0dder:
Unfortunately I'm not  sure how does this stupid console work :(
I think you are right about redirection detection. Look at http://blogs.msdn.com/junfeng/archive/2004/02/25/79621.aspx. That's exactly the same thing you said:) I used that example in my testapp.

Can you redirect your output to a file (if it'll work at all) and then open it using notepad? In my case displaying using WriteConsoleW and WriteFile works fine but redirection works only with WriteFile (WriteConsoleW gives 0-byte file). But when I open created file with notepad I still get messed Unicode characters :(

I think that Locate should provide option to directly write results to a file (without console and redirection) or simple library interface for searching.

5
FARR Plugins and Aliases / Re: Locate32 Plugin for FARR by Okke
« on: December 28, 2007, 05:40 PM »
@lanux128:
Thanks for tips:)


Locate uses Unicode (at least to write console) if databases use Unicode  (you can check this in the settings dialog of locate32.exe).
There is other thing. Locate uses Unicode, but Windows console doesn't. In Windows XP console uses old DOS-style 8-bit codepages to display diacritic characters. In my case (polish language) console uses CP852 codepage and standard windows uses Windows-1250 codepage (or full Unicode). So searching works fine but polish letters are displayed incorrectly in FARR (they have different hex codes in those 2 codepages - thanks to M$) and real Unicode characters (Hebrew, Arabic, Greek etc.) don't work at all. :(

Pages: [1] 2next
Go to full version