Page 1 of 1

Event_freetag and "Find-tags-as-you-type"

Posted: Sun Apr 24, 2011 6:24 pm
by LazyBadger
JS for find-as-type doesn't work (for me) with 8bits (pure russian) tag. It just do nothing (correction - doesn't show SELECT), but work for us-ascii tags (after first entered letter I get select with all choices, even with letter in the middle of word, while expected behavior /for me/ is to show only started with).
Well, consider this as 2-bugs (maybe bugs, maybe dis-function) report

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Tue Apr 26, 2011 9:41 am
by garvinhicking
Hi!

Hm, we use the jquery.autocomplete plugin for that, maybe it's not 8bit-safe. With 8bit, which charset do you mean? UTF-8?

Having it match for *word* is IMHO a huge advantage, especially if you use multi-word tags.

Regards,
Garvin

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Tue Apr 26, 2011 9:58 am
by LazyBadger
garvinhicking wrote:Hm, we use the jquery.autocomplete plugin for that, maybe it's not 8bit-safe. With 8bit, which charset do you mean? UTF-8?
Yes, UTF8. At least I tried only with this charset in Russian
Having it match for *word* is IMHO a huge advantage, especially if you use multi-word tags.
Well, maybe... I can live with it, but when I write "ass" in tags, I expect to see "assember"|"assembly", not "embassy" or "my ass"
Just opinion

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Tue Apr 26, 2011 12:37 pm
by garvinhicking
Hi!

When you view the HTML source of the page where you use "find-tags-as-you-type", please search for "var tags", this should show you a JS assignment of all available tags. Are they properly encoded there?

It seems the jquery.autocomplete.min.js is there only minified, and thus hard to debug. I couldn't find a non-minified version right now...

Regards,
Garvin

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Tue Apr 26, 2011 1:03 pm
by LazyBadger
AFAIS, UTF8-texts are not encoded at all

Code: Select all

<script type="text/javascript" language="Javascript">
                        var tags = ['Assembla','сервисы','русский язык','s9y','Serendipity','Twitter','анонсы','блог','обновления','перевод'];
...

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Tue Apr 26, 2011 1:30 pm
by LazyBadger
Latest archive with full, minified and packed versions from original author
Mercurial project of jQuery autocomplete on GoogleCode
Jörn Zaefferer’s jQuery plugin, with tweaks, on GitHub

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Tue Apr 26, 2011 2:26 pm
by garvinhicking
HI!

Maybe you can try to use the most recent autocomplete.js and see if it works?

If you see proper chars in your JS output, then it's properly UTF-8 encoded, and the only reason that it would then not work would be if the library doesn't support UTF-8 (yet/in our version)...?

I'm short on time so I can't test this on my own.

Regards,
Garvin

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Wed Apr 27, 2011 2:09 pm
by LazyBadger
garvinhicking wrote: Maybe you can try to use the most recent autocomplete.js and see if it works?
Yes. Done it. None of all these 3 autocompleters works with unencoded UTF8-texts
garvinhicking wrote:If you see proper chars in your JS output, then it's properly UTF-8 encoded, and the only reason that it would then not work would be if the library doesn't support UTF-8
?
AFAIS - they can't be encoded at all. You get tags from $wicktags,there they are (?) in human-readable form already, isn't it?
garvinhicking wrote:I'm short on time so I can't test this on my own.
No problem. As I found, only (for me,now) Jörn's autocomplete successor from jQuery UI works with unencoded UTF8 string without any glitches (just replaced default tags some russian texts), here is short Migration Guide

Re: Event_freetag and "Find-tags-as-you-type"

Posted: Wed Apr 27, 2011 4:27 pm
by garvinhicking
Hi!

Would you be able to provide a patch/diff to the plugin so that we could use the new version instead? UTF-8 is really required, so it would be good if the lib supported it...

Regards,
Garvin