2008-09-01から1日間の記事一覧

マルチバイトの全角半角変換について

最初は下記の内容で、全角半角を変換しようと思ったが、失敗した。 require 'kconv' str = 'abcあいうえお' str = str.tr('a-zA-Z', 'a-zA-Z') print str.tosjis しかし、結果は文字化けしてしまう。 下記のサイトを参考にしたおかげで、変換できた。 $K…

FreeBSD 7.0 で ports からインストールした Apache でエラーが発生する

起動時に、下記のエラーが発生する # /usr/local/etc/rc.d/apache2 start Performing sanity check on apache22 configuration: Syntax OK Starting apache22. # tail /var/log/httpd-error.log [alert] (EAI 8)hostname nor servname provided, or not know…

hostname を変更する

hostname を表示する # hostname freebsd.example.com -s のオプションをつけると # hostname -s freebsd と名前からドメイン名を取り除いて表示する。 hostname を変更する # hostname freebsd7.example.com # hostname freebsd7.example.com # hostname -s…