Article ID: Q20041214-01
Q: I generated reports in Japanese, but they look like gibberish. Why?
A:There are two steps in creating reports in languages other than English. First, you need to obtain a Stone Steps Webalizer language file in the language of your choice and configure Stone Steps Webalizer to use this file (see Q20041007-01 for details). Second, you need to instruct Stone Steps Webalizer to generate reports with a reference to the character set that matches characters of the language file.
For example, if you configured Stone Steps Webalizer to use a Japanese language file that is written using Unicode characters from the utf-8 character set, set the following two configuration variables in webalizer.conf, as shown in the example below, to be able to view reports in Japanese:
LanguageFile c:\tools\webalizer\lang\webalizer_lang.japanese HTMLCharset utf-8
Note that the character set specified using the HTMLCharset configuration variable does not have any effect on how Stone Steps Webalizer displays progress messages in the command line window while processing log files.
As of v22.214.171.124, most of the existing language files have been converted to Unicode (UTF-8). The default setting for HTMLCharset has been changed from iso-8859-1 to utf-8. If, however, you would like to convert an old language file to Unicode, you can use the iconv utility on Linux. For example, the following command converts the Japanese language file from euc-jp to utf-8:
$ iconv -f euc-jp -t utf-8 -o webalizer_lang.utf-8.japanese webalizer_lang.japanese
Starting with v126.96.36.199, Stone Steps Webalizer may be configured to generate usage graphs using TrueType fonts and UTF-8 character sets. In order to configure Stone Steps Webalizer to use TrueType fonts, add GraphFontNormal and GraphFontBold directives to the webalizer.conf file. Each of these configuration variables must be a fully-qualified path to the selected TrueType font file(s).
For example, the following two lines configure Stone Steps Webalizer to use Lucida Console for all graph legends and axis markers and Tahoma Bold for all graph titles:
GraphFontNormal c:\winnt\fonts\lucon.ttf GraphFontBold c:\winnt\fonts\tahomabd.ttf
If GraphFontNormal and GraphFontBold are not specified, or if the associated font files cannot be found, Stone Steps Webalizer will use the default raster fonts to generate text for the graphs. Note that raster fonts may not have suitable character representation for non-Latin characters.
You can control the appearance of the generated text using three configuration variables shown below. The first two variables define the size of the normal and bold fonts (in points). The third one instructs Stone Steps Webalizer whether to smooth font edges or not.
GraphFontSmall 8 GraphFontMedium 9.5 GraphFontSmoothing y
If you would like to use non-Latin UTF-8 characters in your language files, make sure that the TrueType font you selected contains the characters you need. For example, Lucida Console shipped with the English version of Windows does not have Japanese characters and if used to generate graphs will result in unusable graphs.