Movable Type導入奮闘記4

それでは、次にMovable Typeで日本語を表示するために必要な設定をすることにする。
このあたりに関しては、いろんなところで詳しく述べられているが、MilanoさんMovable Type 日本語化手順がわかりやすくてお勧めである。
全く同じではオリジナリティがないので、苦労する中で見つけたちょっとしたTipsも紹介するつもりである。


まずは200行目付近の以下の記述を探す。
# By default Movable Type uses the Perl module HTML::Entities to encode
# characters into HTML entities, provided that you have this Perl module.
# However, in some circumstances, even if you have this module, you may
# not wish to use it for encoding; for example, if you are using a language
# that uses a different character encoding (Polish, Russian, etc). In that
# case, you should set the value of NoHTMLEntities to 1.
#
#NoHTMLEntities 1
上記の部分をコメントアウトして
NoHTMLEntities 1
に変える。
次は、300行目付近の、次の記述を探す。
# By default, the character encoding sent in the HTTP headers when you are
# using the system corresponds to the language you have chosen as your
# “Preferred Language” in your user profile. If you would like to override
# that you can set PublishCharset to the character encoding to be used. Be
# aware, though, that this will override the setting for every user and
# every blog in this MT installation. An example encoding might be
# “Shift_JIS”.
#
#PublishCharset Shift_JIS
ここをコメントアウトして、
PublishCharset UTF-8
に変えるのである。
文字コードに関してはいろいろ悩むところだが、Movable Typeを使うに当たっては、RSSリーダーを活用することも考えると、UTF-8を選んでおく方が文字化け問題などが楽になる。
すでに作っている自分のHPにWeBlogを組み込む場合には、EUC-JPの方が安心感があるのだが、まあ、将来性をとってすべてUTF-8で作り直すことにした。
さて、以上でおしまいなのだが、環境によってはすべてのインストールが正常に終わっても、Movable TypeにLog inできない現象が起きる場合がある。
これは割とよくあるみたいで、僕も悩まされた。
そのときには、以下の記述を書き換えてみてほしい。
# The filesystem path to the ‘db’ directory, where your MT database
# files are stored. You will probably need to change this when you
# first install MT; instructions for doing so are in the Installation
# Instructions, in INSTALLING THE MOVABLE TYPE APPLICATION CODE, Step 8.
DataSource ./db
20行目付近だが、「./db」の部分をフルパスに書き換えるのである。
例えば「/home/usr/your-mane/public_html/mt/db」のように。
これでもうまくいかなければ、FTPクライアントでパスをよく見て、自分のプロバイダのルートからの記述を書いてみるといい。
例えば「/mt/home/your-mane/public_html_mt/db」である。
僕はこれでうまくいった。
だが、これは最後の手段で、5で述べるインストールするディレクトリやパーミッションに気をつければ、ここまで気を遣うことはないはずである。
ただ、これはこれで別の問題が生じるのだが。
詳しくは次回に。

コメントを残す

メールアドレスは公開されません

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください