Archive for December, 2007

Mr Kirkland

Facebook Presentation at Tokyo 2.0

Bookmark and Share

Last night I presented my Facebook development experiences to the crowd at Tokyo 2.0. I’m not going to repeat myself as most of the information I presented I’ve already written about in the facebook section, but I’d like to share the presentation data: odp or pdf and mention my references:

Mr Kirkland

Japanese charaters in code igniter urls

Bookmark and Share

Code igniter is restrictive over permitted url characters (a good thing!), and it’s simple enough to edit the permitted_uri_config option to add more charaters. However, what if you’re dealing with Japanese charaters in the url?

Well (after a little searching) it turns out that this isn’t too difficult to fix as the config value is a regex and one can add the kanji charater ranges in a similar fashion to the standard ascii ‘a-z’ syntax:


$config['permitted_uri_chars'] = ‘a-z 0-9~%.:_-’;
        ↓
$config['permitted_uri_chars'] = ‘一-龠ぁ-ã‚“ã‚¡-ヴーa-zA-Z0-ï¼™a-z 0-9~%.:_-’;

courtesy of: http://pricewave.blog110.fc2.com/blog-category-4.html

Mr Kirkland

setting up terminal and vim for japanese on osx

Bookmark and Share

I’d hazzard a guess that there aren’t a great deal of non-japanese vi users on osx who need to work in japanese, but at the very least this will serve as a reminder for myself later on!

First up, the most useful resource I found was the following page http://osksn2.hep.sci.osaka-u.ac.jp/~taku/osx/vimjp.html (thanks to Taku Yamanaka!)

If you can read Japanese, then follow his instructions otherwise, the key steps are:

Setting up VIM

edit. you ~/.vimrc file and add:

:set enc=utf-8
:set fenc=utf-8
:set fencs=iso-2022-jp,euc-jp,cp932

Edit your terminal settings

  • File -> Show Info (ファイル>情報を見る)
  • Go to Emulation (エミュレーション)
  • uncheck Escape non-Ascii characters (非Ascii文字をエスケープする)
  • Go To Display (ディスプレイ)
  • Check Wide glyphs count as 2 columns (ワイドグリフは2桁とカウントする) and Wide glyphs for Japanes/Chinese/etc.(日本語や中国語などにワイドグリフを使用する)
  • You’ll probably want to make the settings default (設定をデフォルトとして使用)

Bash

For good measure you might want to tweak bash. Edit ~/.profile and add:

export LC_CTYPE=en_US.UTF-8

Edit ~/.inputrc and add:

set input-meta on
set output-meta on
set convert-meta off
set meta-flag on
set output-meta on

You’ll need to reload bash for these changes to take affect - close and reopen terminal.


About

You are currently browsing the Mr Kirkland 2.0 weblog archives for the month December, 2007.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

Timezone

  • JST: 2008-05-13 21:14
  • BST: 2008-05-13 13:14
  • PDT: 2008-05-13 05:14