Tuesday, April 25, 2006

Request Encoding

In JSP you have to manually set request encoding otherwise it will default to iso-8859-1. With the default you won't access any param whose value is not in iso-8859-1 encoding correctly. e.g., the copyright character "©".

To set request encoding, use jstl:

xmlns:fmt=http://java.sun.com/jsp/jstl/fmt

<fmt:requestencoding value="utf-8">

Paste High DPI Image from Clipboard into Photoshop

You want to convert a MS Word graph into image, using Photoshop.

Copy to clipboard in Word.
New file in Photoshop.

When you New file from clipboard, the initial settings is 72DPI. Change the units to inch, dpi to 300. New. Paste. Result is incorrect.

Do not close the window. New file again. This time the pixel settings are much larger. Change the DPI to 300, and units to inch. The dimensions should match Word. Now paste.

cvs server on cygwin

If you want to connect from eclipse to a cvs running on cygwin, cygwin version 1.5.19 won't suffix. It has a bug that returns an unexpected errorno when cvs attempts to create "/tmp/cvs-serv???/.". The latest cygwin snapshort solved it.

With that bug corrected, in eclipse select extssh method.