Words with ISO letters dont show up in the search!

Sep 5, 2007 at 4:23 PM
Hi

I cant seem to find words with my native (icelandic) letters when using the search engine! Letters like æ,þ and the comma letters ó,í,ý are not found. You probably know about this but if not, here it is!

Sturla the Icelander
Sep 5, 2007 at 4:38 PM
Edited Sep 5, 2007 at 5:53 PM
I found the same problem in Czech language in standard BlogEngine.NET configuration.

Do your post files on your server contain these characters or html encoded letters? Just check physical files on your server. For example í is encoded as í etc. due to Tiny MCE default configuration. I had to make a couple of modifications to avoid html encoded characters.

If you want to change this Tiny MCE default configuration, modify slightly \admin\tinymce\tinymce.js file. Open it in any notepad and find string
this.def("entityencoding","named");
Change "named" to "raw", save, close etc. Connect to your server and recycle your application pool in which BlogEngine application exists (or simply "touch" web.config file). Do not forget to clear your browser cache, this is important because tiny_mce.js resists in your browser cache.

Then you can create new post. Remember that your older posts probably contain html encoded characters so it will not be possible to find them. After successful post you can try OpenSearch on your blog. Forget on search field in your blog pages, there is a some trouble with non-ascii characters. Try it with FF2+ or IE7 browser by selecting your search provider in the top right corner. It works fine for me (and trust me we have many special characters in Czech language).

The only problem is with form field contained in BlogEngine.NET pages. I do not have enough time to find what is wrong, unfortunately this type of search is important for visitors with older browsers because they cannot select search providers. It is interesting that some letters can be used (čďěňřšťůž for example), but others not (áéíóöúüý plus the letters you mentioned).

Radek
Sep 5, 2007 at 6:44 PM
I solved the problem with search form field. It was caused by obsolete JavaScript function escape() which should be replaced by newer encodeURI() in blog.js file.

If you want to change it you have to download latest source code, modify that file and compile your own DLL.

Short description based on 4300 source code:
1) open BlogEngine\DotNetSlave.BusinessLogic\Web\scripts\blog.js
2) locate the following line
var search = "?q=" + escape(input.value);
3) replace it with the following
var search = "?q=" + encodeURI(input.value);
4) save, compile and test it. It works for me.

Radek

Jan 1, 2009 at 9:06 PM
I also have this problem. Be sure this fix.
Ex: "Mão" is replaced to "mão"
[],