Archives

You are currently viewing archive for 01 October 2009
Category: Oracle
Posted by: hajime osako
DBAsupport.com : Oracle 9i Central : Oracle Time Zone

select DBTIMEZONE from dual;
ALTER database SET TIME_ZONE = 'UTC';

select SESSIONTIMEZONE from dual;
alter session set TIME_ZONE='-03:00';
Category: Web dev
Posted by: hajime osako
MimeUtility (Java EE 6 - DRAFT)

There are a set of methods to encode and decode MIME headers as per RFC 2047. Note that, in general, these methods are not needed when using methods such as setSubject and setRecipients; JavaMail will automatically encode and decode data when using these "higher level" methods. The methods below are only needed when maniuplating raw MIME headers using setHeader and getHeader methods. A brief description on handling such headers is given below:

RFC 822 mail headers must contain only US-ASCII characters. Headers that contain non US-ASCII characters must be encoded so that they contain only US-ASCII characters. Basically, this process involves using either BASE64 or QP to encode certain characters. RFC 2047 describes this in detail.