Thursday, December 29, 2005

Install Ubuntu Linux Cont'

Today, I go to fine tune the Ubuntu Linux in my desktop. One disadvantage of Ubuntu comparing with Debian is Ubuntu supports less packages officially. For example, the SCIM, a Input Method modules support many languages, is not included in Ubuntu.

To install the SCIM, I includes the "Universe" packages pool in my Ubuntu and install the SCIM. The "Universe" pool contains some extra packages which is not officially support by Ubuntu team. After install the SCIM, I try to run the "Setup" of SCIM. However it can't run properly -- seg. fault. As a Debian user, this problem becomes the weak points of Ubuntu. In Debian, it officially support much more packages than Ubuntu. I think Ubuntu need to put more effort to support more packages.

Finally, I decide to install a Debian on my desktop and give up the fine tuning the Ubuntu. The installation of Debian is more complicated than Ubuntu. Fortunately, I am a experienced Debian User.

After installation complete, the XWindow can start correctly. However, my sound card doesn't work. To solve this, I need to install ALSA package via the "aptitude" (Note: aptitude is a Debian package manager). Moreover, the middle button of my mouse doesn't work and this is similar to the case of Ubuntu. The solution was mentioned yesterday's BLOG entry. Then, I install the SCIM and other Chinese related packages. The SCIM works properly!

Wednesday, December 28, 2005

Install Ubuntu Linux

According to DistroWatch, Ubuntu Linux is the most popular Linux distribution. Today, I want to experience how good it is.

The installation is quite simple and straight forward. It can detect all my hardware and can run up XWindow without any manual settings. My sound card and CD RW also works properly.

There is one problem on my mouse. The middle key doesn't works. With hours of investigation, I find the solution. The problem is due to the "psmouse" kernel module. It detects my mouse incorrectly. To solve the problem, the parameter "proto=imps" should be used while loading the kernel module. So, I create a file "psmouse" in "/etc/modprode.d" with the following contents:

options psmouse proto=imps 

Wednesday, December 14, 2005

CSV File Format

CSV stands for Comma Separated Values. It is a common file format for storing tabular data, e.g. spread sheet data. The file format of CSV is simple -- a text file, values are separated by comma (,) and rows are separated by newline. However, there is still some tricky in the format.

The tuck point is how to escape the comma in the values. If a value contains commas, the value should be quoted with double-quote ("). e.g.:

value one,"value two with ',' inside",value three
If a value contains a double-quote, the value should be quoted with double-quote and the double-quote in the value should be escaped with another double-quote. e.g.:
value one,"value two with '""' inside",value three
The specification of the CSV is described in RFC4180.

Even there is an RFC standard for CSV format, there are some deviation standard exists. In some applications, the comma and double-quote is escaped by a back-slash (\). Moreover, the character encoding is not stored in the file format and causes ambiguity. So, it is not trivial while using this format.