« プリンタ買い替え | トップページ | 12.04 再インストール »

2011年3月27日 (日)

viewvc: UnicodeDecodeError回避

以前viewvcをインストールしたが、日本語のテキストファイルを見ようとするとUnicodeDecodeErrorが出てひどいことになるので、修正する。
まず pythonの文字コード検出モジュールが必要だそうなのでインストール。

# apt-get install python-chardet
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  python-chardet
0 upgraded, 1 newly installed, 0 to remove and 18 not upgraded.
Need to get 175kB of archives.
After this operation, 721kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu/ maverick/universe python-chardet all 2.0.1-1 [175kB]
Fetched 175kB in 0s (234kB/s)    
Selecting previously deselected package python-chardet.
(Reading database ... 200871 files and directories currently installed.)
Unpacking python-chardet (from .../python-chardet_2.0.1-1_all.deb) ...
Processing triggers for man-db ...
Setting up python-chardet (2.0.1-1) ...
Processing triggers for python-support ...

続いて viewvc の文字コード検出機能を有効化するために /etc/viewvc/viewvc.conf を書き換える。

enable_syntax_coloration = 1
detect_encoding = 1

ここまでできたら apache2に設定を読み込ませる。

# service apache2 reload

以上で終了。

« プリンタ買い替え | トップページ | 12.04 再インストール »

subversion」カテゴリの記事

xubuntu 10.10」カテゴリの記事