[usmt dev] base 64, utf-7 etc and rfc2152

Jason Pyeron dev@smime.pyerotechnics.com
Tue, 13 Feb 2001 15:32:53 -0500 (EST)


encode = /^\s?:/ ? BASE64viaUTF-7 : UTF-7 ; # only allow for 1 whitespace

example
===========
key::BASE64 +- will be equivelent to + since - is ignored
key: :BASE64
key:UTF-7
key:  :NotBase64
key:+Og-NotBase64
key: +Og-NotBase64
===========

unaware of UTF-7 only need to translate "+-" -> "+", aware of UTF-7 handle
accordingly

below are random notes to read at leisure:

SetD:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'(),-./:?
SetO:!"#$%&*;<=>@[]^_`{|}
SetB:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

http://www.landfield.com/rfcs/rfc2152.html

Summary

   The UTF-7 encoding allows Unicode characters to be encoded within the
   US-ASCII 7 bit character set. It is most effective for Unicode
   sequences which contain relatively long strings of US-ASCII
   characters interspersed with either single Unicode characters or
   strings of Unicode characters, as it allows the US-ASCII portions to
   be read on systems without direct Unicode support.

   UTF-7 should only be used with 7 bit transports such as mail. In
   other contexts, use of straight Unicode or UTF-8 is preferred.




http://mlarchive.ima.com/ietf-822/1999/0054.html
http://mlarchive.ima.com/ietf-822/1999/0045.html
from 
http://www.google.com/search?q=utf+headers