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」カテゴリの記事
- 特定のファイルをapache2で非公開に(2012.06.15)
- subversionをapache経由で(2012.06.12)
- viewvc 再インストール(2012.06.03)
- 各種初期設定 再び(2012.06.03)
- viewvc: UnicodeDecodeError回避(2011.03.27)
「xubuntu 10.10」カテゴリの記事
- viewvc: UnicodeDecodeError回避(2011.03.27)
- プリンタ買い替え(2011.01.28)
- Windows Clientからの印刷(2010.11.02)
- 10.10にアップグレード(2010.10.16)

