3/31/09 KJW -- keithw@mit.edu This locker includes an internationalized version of libzephyr and the zephyr clients. Mainline zephyr doesn't define the character set for displayable zephyr messages. The Zephyr Programmer's Manual specifies "printable ASCII form," but this recommendation hasn't been adhered to. As a result, some clients encode and interpret the message as Latin-1, and some as UCS in UTF-8. One popular client (BarnOwl) interprets each field of the zephyr message separately, as UTF-8 if it can, and Latin-1 otherwise; it sends each field as Latin-1 if it can, and UTF-8 otherwise. The lack of a standardized on-the-wire encoding has caused a loss of interoperability. Additionally, no popular zephyr client has been internationalized to work in different locales and terminal character encodings. zwgc and zwgc -ttymode directly hand the zephyr message to X11 or to the terminal without consideration of the terminal's character set. BarnOwl assumes the user's terminal uses a UTF-8 state machine and does not work properly outside of a UTF-8 terminal. The i18n patch in the zdev locker fixed those problems in libzephyr and the included zephyr clients. It standardizes the on-the-wire encoding of the zephyr message as UTF-8. It upgrades the minor version number to ZEPH0.3 to signal this standardized encoding. Since not every user has a UTF-8 terminal, and Unix programs are required to function in the portable locale, the zephyr clients now speak the user's own character encoding (given by the LANG, LC_ALL, or LC_CTYPE environment variable) and translate to and from the wire encoding. At the same time, the i18n patch attempts to gracefully handle zephyrs in the Latin-1 encoding, both from BarnOwl and from the mainline zephyr clients in a Latin-1 locale. If an incoming ZEPH0.2 zephyr can't be parsed as UTF-8, libzephyr silently interprets it as Latin-1 instead. (libzephyr also performs this task for a ZEPH0.3 zephyr, but since those are supposed to be in UTF-8 always, the library signals the condition to the user by prepending an "[Invalid incoming character]" notice to the zephyr message.) For outgoing zephyrs, libzephyr attempts to interpret the user-provided text according to the user's own character encoding, and translates it to UTF-8 for the wire. If the provided text isn't valid in the user's encoding, libzephyr interprets the user-provided text as Latin-1, translates it to UTF-8 for the wire, and prepends an "[Invalid outgoing character]" notice so the recipient will know the message may have been garbled.