Markus Humm wrote:
> Hello,
> 
> I used SmtpCli in one of my applications (ok still ICS V5 under D2007)


ICS V7 supports D7+, so unless you have to support Windows 2000- 
you should upgrade ASAP.

> and today I found out that I send all mails with charset set to
> iso8859-1, even when the message body later on contains japanese
> (ANSI). This is of course not well displayed in Outlook on the
> receiving site. Even changing the view/charset doesn't change
> anything for those far eastern languages. For russion setting this to
> russian (windows) does at least change the chars so they're proper
> and result in readable text.

In Ansi Delphi the Charset property must match the message text 
encoding.    
In oder to get the current code page call Win API GetAcp() and assign
the matching mime charset name from 
http://www.iana.org/assignments/character-sets.

In V7 if you assign an empty string to property Charset the component
assigns the correct mime charset according to current system Ansi code
page automatically.

> 
> Allow8BitChars  is left on it's default value 

This should be turned **off** when you use the MailMessage property
it's just on by default for backward compat.

>(remember: I'm still on
> V5, I will move as soon as I get the time to move this project from
> D2007 to something newer).

Again, ICS v7 does support D7+. 
> 
> DefaultEncoding is set to smtpEnc7bit

That's OK as long as Allow8BitChars is also set to false at the same
time, since that will automatically encode the strings quoted printable
if required (if any 8-bit chars).   

> 
> Any hints for me how to do this the correct way? e.g. find out the
> user's charset and use that? Or sending UTF8? (does this work with all
> mail clients?)

UTF-8 is the charset to use, that should work with all common mail clients
today. In Delphi 2009+ the component automatically converts the 
MailMessage.Text to the Charset specified, in D2007 you have to encode
the mail message text manually.  

-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to