Website crash during search query

Upon accessing this page https://www.swi-prolog.org/search?for=format within 30 seconds of Mon Oct 16 19:58:15 UTC 2023, I received the following crash report:

Internal server error

Cannot represent due to `encoding' (cannot represent text using encoding iso_latin_1)
In:
[68] porter_stem:porter_stem(π,format)
[67] pldoc_search:token_match_quality(summary,format,['Evaluate',to|...],_780) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:946
[66] pldoc_search:summary_match_quality(format,"Evaluate to the mathematical constant π (3.14159 ... ).",_826) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:916
[65] pldoc_search:match_object(format,f(pi/0),"Evaluate to the mathematical constant π (3.14159 ... ).",summary,_864) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:907
[64] pldoc_search:exec_search(format,manual-('/home/swipl/lib/swipl/doc/Manual/arith.html'- ...),_908,[resultFormat(summary),...|...]) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:774
[63] pldoc_search:exec_search(format,_970,[resultFormat(summary),...|...]) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:751
[61] findall_loop(_1012,pldoc_search:matching_object(format,_1030,...),_1016,[]) at /home/swipl/lib/swipl/boot/bags.pl:109
[60] cleanup_bag('$bags':findall_loop(_1068,...,_1072,[]),'$bags':'$destroy_findall_bag') at /home/swipl/lib/swipl/boot/bags.pl:106
[57] pldoc_search:search_doc(format,_1112,[resultFormat(summary),...|...]) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:614
[56] pldoc_search:cached_search(format,_1162,_1164,[resultFormat(summary),...|...]) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:258
[55] pldoc_search:search_reply(format,[resultFormat(summary),...|...],_1216,_1218) at /home/swipl/lib/swipl/library/pldoc/doc_search.pl:223
[54] html_write:do_expand(\search_reply(format,...),plweb_page,_1268,_1270) at /home/swipl/lib/swipl/library/http/html_write.pl:427
[53] html_write:html_expand(\search_reply(format,...),plweb_page,_1314,_1316) at /home/swipl/lib/swipl/library/http/html_write.pl:406
[50] html_write:html_expand(plweb_page: \ ...,plweb_page,_1360,_1362) at /home/swipl/lib/swipl/library/http/html_write.pl:406
[47] html_write:do_expand([...|...]div(plweb_page: ...),plweb_page,[nl(1),<|...],_1408) at /home/swipl/lib/swipl/library/http/html_write.pl:479
[46] html_write:html_expand([...|...]div(plweb_page: ...),plweb_page,[nl(1),<|...],_1478) at /home/swipl/lib/swipl/library/http/html_write.pl:406
[43] html_write:do_expand(class(...)div(...div...),plweb_page,[nl(1),<|...],_1548) at /home/swipl/lib/swipl/library/http/html_write.pl:479
[42] html_write:html_expand(class(...)div(...div...),plweb_page,[nl(1),<|...],_1616) at /home/swipl/lib/swipl/library/http/html_write.pl:406
[41] html_write:qhtml([...div...],plweb_page,[nl(1),<|...],_1684) at /home/swipl/lib/swipl/library/http/html_write.pl:395
[36] html_write:html_expand(plweb_page:[...|...],plweb_page,[nl(2),<|...],_1748) at /home/swipl/lib/swipl/library/http/html_write.pl:406

Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail.
SWI-Prolog httpd at swipl

===
The previous page was re_compile/3.

I then refreshed https://www.swi-prolog.org/search?for=format
The browser was firefox 117.0 64 bit on Windows 10. I placed other strings within the “search” text box with the same result.

Thanks for reporting. Fixed. Result from more usage of Unicode on the pages and good old porter_stem/2 not handling that. Fortunately there is snowball/3 :slight_smile: