On 9/20/05, John Cherouvim <[EMAIL PROTECTED]> wrote: > After 6 hours of messing up with encodings I came up with a solution. > edit this file: pubs\{YOURPUB}\lenya\content\search\search-and-results.xsp > near line 180 you should see String query = <xsp-request:get-parameter > name="query" default=""/>; > after that add: query = new String(query.getBytes("ISO-8859-1"), "UTF-8"); > > Which I fail to understand why, but it works. > I cannot understand it as the encoding on the page is UTF-8 and not > ISO-8859-1, so I thought that the contents of the forms would be already > encoded in UTF-8. Some guy told me that all HTML forms send their > contents in ISO-8859-1.. > > Anyway this fixes all my problems and makes lucene work with native chars. > If anyone can enlighten us about this subject or find a better way to > solve this problem, please do so :)
1. It does not work because of anything to do with the encoding used by search. It works because Java getBytes() function changes several characters to the question mark character because the characters are not defined in the default encoding. ISO-8859-1 contains the full set of characters, so it does not change (ruin) the string. 2. I will apply this to the instructions and code on solprovider.com tomorrow. Who creates the bugzilla? solprovider --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]