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:
Archive for December, 2007
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'] = ‘一-é¾ ã-ã‚“ã‚¡-ヴーï½-zA-Zï¼-ï¼™a-z 0-9~%.:_-’;
courtesy of: http://pricewave.blog110.fc2.com/blog-category-4.html
setting up terminal and vim for japanese on osx
Published by December 6th, 2007 in Uncategorized and webmastering. 0 CommentsI’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 (ワイドグリフã¯ï¼’æ¡ã¨ã‚«ã‚¦ãƒ³ãƒˆã™ã‚‹) 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.
