Tao’s Blog

  • Tao said: I twit, 20 minutes ago
  • Tao said: Aha 7 days ago

Wednesday, December 31, 2003

Quirky editor [Tips] — tao @ 7:28 pm

I met a special situation: I need to edit a text file, however, that file must do not contain a trailing new line character, e. g. no new line character in the end of the file.

I tried vi, BBEdit Lite, all adding a trailing new line at the end. I put two characters in the file, the file always ends up with three bytes. (Maybe the last character is a end-of-file character? Anyway, that’s not very important. )

The important thing is: only the Mac OS X default text editor give me a clean two byte file, all the other editors (on the Mac platform) always give me a three-byte file. That’s interesting. Even vi for Mac OS X give me some un-wanted byte.

Tuesday, December 30, 2003

First blog [Tips] — tao @ 10:30 pm

It’s been a long day, trying to figure out how to make wordpress working with Chinese. At first, it can display Chinese characters, but when you edit the post, all the characters are transformed into entities. That’s no good.

Honestly, the documentation of the wordpress is not so great, at least for those who use double-byte character set languages. Finally, I figured out some extra steps to make it work for Chinese:

1. You must change the wp-install.php, to make the htmltrans false.
2. Change the character set of index.php and b2header.php to gb2312.

Without above steps, you will be stuck if you want to use Chinese, Japanese, or Korean with wordpress.

BTW, the URL for wordpress is: http://wordpress.org

Enjoy.

     

0.021 Hosted by tongtao.com and powered by WordPress cBlog