Forum OpenACS Development: build_mime_message default charset should be UTF-8

Hi all,

We (Adenu at UNED) have greek partners who will soon start to use dotLRN to deliver courses. Yesterday they tested notifications and it appeared that messages written in greek arrive with question marks instead of greek characters (content-type charset was set to iso-8859-1).

To fix it, at first I thought of passing the charset of the sender when building the message with build_mime_message but then I realized that sometimes a message can be a mix of different languages (e.g. english and greek, actually it happened too). The other fix would be to always pass UTF8 as the charset to use when building the mime message.

Since messages can be send from many packages, not only notifications, I've looked for calls to build_mime_message in my installation but none of the calls pass the charset so I suspect it's the same in other packages that I didn't check.

Right now, build_mime_message charset defaults to iso-8859-1 and in the documentation it says:

Comment from the original code: The message is encoded with iso-8859-x charset (all mail readers I've tested seem to be unable to handle utf-8 encoding). A future version of this proc should probably support an alternative charset argument or switch.
Today, mail readers handle UTF-8 encoding right so time has come to change it to UTF8 (I've committed to HEAD).
Collapse
Posted by Malte Sussdorff on
I remember when Nils wrote that comment. He was testing Outlook Express and Eudora among some others over a year back and had bad experiences with German Umlauts in UTF-8.

If it works for your Greek partners than even the better and please just use UTF-8 instead.