Converting ISO-2022-JP to UTF-8 and back

From Messaging Server Technical Reference Wiki
Jump to: navigation, search

Suppose that ISO-2022-JP is used locally, but that a site wishes to convert to UTF-8 for use on the Internet. In particular, suppose at this site the channel used to send to the Internet is tcp_local, tcp_lmtpcs* channels are used to deliver to local users, and local users' submitted messages are submitted via tcp_submit and tcp_auth.

Example of Converting ISO-2022-JP to and from UTF-8

! Entries selecting message traffic eligible for charset conversion 
  IN-CHAN=tcp_submit;OUT-CHAN=tcp_local;CONVERT    Yes 
  IN-CHAN=tcp_auth;OUT-CHAN=tcp_local;CONVERT      Yes 
  IN-CHAN=tcp_local;OUT-CHAN=tcp_lmtpcs*;CONVERT   Yes 
! Disable charset conversion for all other message traffic 
  IN-CHAN=*;OUT-CHAN=*;CONVERT                     No 
! Details of which charset to convert to which other charset 
  IN-CHAN=tcp_submit;OUT-CHAN=tcp_local;IN-CHARSET=ISO-2022-JP   \
  IN-CHAN=tcp_auth;OUT-CHAN=tcp_local;IN-CHARSET=ISO-2022-JP     \
  IN-CHAN=tcp_local;OUT-CHAN=tcp_lmtpcs*;IN-CHARSET=UTF-8        \

See also: