Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #180 (new defect)

Opened 8 years ago

Last modified 7 years ago

EasySearch Index Management - Report

Reported by: oyvind@… Owned by: andyturl@…
Priority: minor Component: EasySearch
Keywords: Cc:

Description

The search report does not handle norwegian letters like æ ø å. See attachment.

The No Result show the same as the Last 7 days. See attachment.

The report is great!

Attachments

EasySearchReportNorwegianLetters.png (3.4 KB) - added by oyvind@… 8 years ago.
EasySearchReportNoResults.png (3.6 KB) - added by oyvind@… 8 years ago.

Change History

Changed 8 years ago by oyvind@…

Changed 8 years ago by oyvind@…

comment:1 Changed 8 years ago by andyturl@…

Thanks for pointing this out, looks like the output needs to use Html.Encode() for Norwegian characters.

I'm not sure what you mean about the last '7 days no results' report showing the same, do you mean having odd characters or reporting the same as '7 Days with results' report?

comment:2 Changed 8 years ago by oyvind@…

I mean the same result as the Last 7 days.

comment:3 follow-up: ↓ 4 Changed 7 years ago by kjetil-haanes.myhre@…

I got the same problem. It is due to the file encoding. I'm not configured here, so I can't submit the code for review, but here is my solution. In CreateSearchAuditJob.cs, when reading the query terms from file, add encoding to the streamreader. This did the trick for me:

new StreamReader(
   new FileStream(info.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite), 
   System.Text.Encoding.Default);

comment:4 in reply to: ↑ 3 Changed 7 years ago by andyturl@…

There was an error in the documentation that was missing the property to require that logging should use UTF-8 encoding (it was added to the docs earlier but somehow got removed in a more recent update).

StreamReader defaults to UTF-8, however log4net defaults to ANSI - meaning characters like ø, ü, won't be displayed properly. If you change your search logging to add in the UTF8 encoding property it should work properly from then on;

<appender name="EasySearchStatisticsRollingLogFileAppender"

type="log4net.Appender.RollingFileAppender">

<file value="<Logs>/easysearchstatslog.txt" />
<appendToFile value="true" />
<encoding value="utf-8" />
<datePattern value="yyyyMMdd" />
<rollingStyle value="Date" />
<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%m%n" />

</layout>

</appender>

Replying to kjetil-haanes.myhre@…:

I got the same problem. It is due to the file encoding. I'm not configured here, so I can't submit the code for review, but here is my solution. In CreateSearchAuditJob.cs, when reading the query terms from file, add encoding to the streamreader. This did the trick for me:

new StreamReader(
   new FileStream(info.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite), 
   System.Text.Encoding.Default);
Note: See HelpUser/Tickets for help on using tickets.