[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sup-devel] Heliotrope improving but still found some issues
Hi Horacio,
Reformatted excerpts from Horacio Sanson's message of 2011-07-05:
> First any attempt to search using japanese text fails with the dreaded
> incompatible character encodings error:
I'm having trouble reproducing this, or even understanding why your fix would
help, since all string literals in the code should be UTF-8-encoded.
Could you please apply this patch and tell me what the output is when
you feed it a crashing search term? Thanks!
--- cut here ---
diff --git a/bin/heliotrope-server b/bin/heliotrope-server
index c9754d4..ca764c0 100644
--- a/bin/heliotrope-server
+++ b/bin/heliotrope-server
@@ -219,6 +219,19 @@ class HeliotropeServer < Sinatra::Base
end
nav += "</div>"
+ puts "start"
+ p query.original_query_s.encoding
+ p query.parsed_query_s.encoding
+ p header("Search: #{query.original_query_s}", query.original_query_s).enc
+ p "<div>Parsed query: #{escape_html query.parsed_query_s}</div>".encoding
+ p "<div>Search took #{sprintf '%.2f', info[:elapsed]}s and #{info[:contin
+ p "#{nav}<table>".encoding
+ p results.size
+ p results.map { |r| threadinfo_to_html r }.join.encoding
+ p "</table>#{nav}".encoding
+ p footer.encoding
+ puts "end"
+
header("Search: #{query.original_query_s}", query.original_query_s) +
"<div>Parsed query: #{escape_html query.parsed_query_s}</div>" +
"<div>Search took #{sprintf '%.2f', info[:elapsed]}s and #{info[:contin
--- cut here ---
--
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel