Just Another Blog

Are you thinking what I'm thinking?

Wednesday, August 31, 2005

Free Opera registration code received

If interested, follow this link. You can ask me if the link is broken.

Sunday, August 28, 2005

My book collection

As of August 28, 2005, my book collection:




Feel free to borrow! :-)

Thursday, August 18, 2005

Neon Genesis Applegelion

That's… kuso!

Neon Genesis Applegelion

Saturday, August 13, 2005

The dyling browsers

The IEBlog has just released the new logo for Internet Explorer 7. Surprisingly, the logo reminded me of the splash screen shown when starting the legendary browser, Netscape Communicator:

See the similarities?

Look like Internet Explorer is moving toward the direction of the crappy Netscape. ;-)

Monday, August 08, 2005

Firefox (for Windows)-specific file upload problem

I was writing a simple PHP script for handling file upload. I found that some files that I uploaded with Firefox are 0 bytes in size (it should be non-zero). Since I developed it under a Chinese (simpified) Windows, I found this problem rather ridicious: I can't upload a file named with certain simpified Chinese characters!

Let's illustrate with the following example:

  1. Create a dummy file with dummy content.
  2. Rename it so that it contains the character , e.g. 高达 (Gundam).
  3. Upload them using a HTML form (encoded in UTF-8).

The result in PHP (by using print_r $_FILES;):

    [attachment] => Array
            [name] => Array
                    [0] => print.pdf
                    [1] => 高_seed.pdf
                    [2] => 
                    [3] => 
                    [4] => 

            [type] => Array
                    [0] => application/pdf
                    [1] => application/octet-stream

            [tmp_name] => Array
                    [0] => C:\WINDOWS\TEMP\php17F.tmp
                    [1] => C:\WINDOWS\TEMP\php180.tmp

            [error] => Array
                    [0] => 0
                    [1] => 0

            [size] => Array
                    [0] => 31527
                    [1] => 0



See? The character was replaced with a underscore _, and the file size is zero. The file upload was success since the error codes are 0s.

Obviously Firefox can't find the file (can't resolved the path?), so it uploads nothing to the server. I guess it is another time to file a bug in the famous bugzilla database. ;-)

Edited: it seems that the bug was already filed by someone else.

Edited again: anyway, I filed the bug, although it seems that no one noticed yet. :-(

Wednesday, August 03, 2005

Wow! Mozilla "Corporation"

With over 10% usage share, Mozilla is now a quite profitable business. Mozilla Corporation, a subsidiary wholly owned by Mozilla Foundation, is just created today with the aim to gather cash for supporting the wonderful Mozilla project (well, according to my understanding).

Who know what will happen next year. ;-)

P.S. I've just created its entry in Wikipedia. Help fixing and improving it if you can. :-)