Forum: Ferret Highlight method creates malformed characters.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0377ec6fab3880beb5da3dde78af5418?d=identicon&s=25 Henrik Zagerholm (cubiq)
on 2007-03-06 10:45
(Received via mailing list)
Hello list,

I've just updated to 0.11.3 and I came upon this problem.
When using the highlight function in a rails application I sometimes
get the error "Malformed UTF-8 character."

It is just on certain documents and if I change the excerpt length
the error disappears so it feels that if the highlight method cuts
the text at the wrong character the function returns a string with
malformed characters.
This then causes the error when the text is outputted.

Is this a problem with ferret or with rails?
I'm still on 1.1.6 and I haven't upgraded to rails 1.2 yet so I'm not
using the new multi byte unicode functions.

Regards,
henrik
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 David Balmain (Guest)
on 2007-03-06 12:16
(Received via mailing list)
On 3/6/07, Henrik Zagerholm <henke@mac.se> wrote:
> This then causes the error when the text is outputted.
>
> Is this a problem with ferret or with rails?
> I'm still on 1.1.6 and I haven't upgraded to rails 1.2 yet so I'm not
> using the new multi byte unicode functions.

Hi Henrik,
This must be a problem with Ferret. I'm not sure how it is happening
though. If you can narrow it down to a failing test case it would be
really helpful.

Thanks,
Dave
0377ec6fab3880beb5da3dde78af5418?d=identicon&s=25 Henrik Zagerholm (cubiq)
on 2007-03-06 13:44
(Received via mailing list)
6 mar 2007 kl. 12:04 skrev David Balmain:

>> malformed characters.
>> This then causes the error when the text is outputted.
>>
>> Is this a problem with ferret or with rails?
>> I'm still on 1.1.6 and I haven't upgraded to rails 1.2 yet so I'm not
>> using the new multi byte unicode functions.
>
> Hi Henrik,
> This must be a problem with Ferret. I'm not sure how it is happening
> though. If you can narrow it down to a failing test case it would be
> really helpful.

Hi Dave,

I'll do some more testing and I'll try to present a small test case
for you.

You'll have it in a day or two.

Cheers,
Henrik
B5e329ffa0cc78efbfc7ae2d084c149f?d=identicon&s=25 David Balmain (Guest)
on 2007-03-07 00:07
(Received via mailing list)
On 3/6/07, Henrik Zagerholm <henke@mac.se> wrote:
> Hi Dave,
>
> I'll do some more testing and I'll try to present a small test case
> for you.
>
> You'll have it in a day or two.

Hi Henrik,

If it is any easier, all I probably need is the failing search string.
It'd be even better if you could give me the matching text that is
supposed to be highlighted but I can probably work it out from there.

Cheers,
Dave


--
Dave Balmain
http://www.davebalmain.com/
This topic is locked and can not be replied to.