Difference between revisions of "TSmtpCli.CharSet"

From Overbyte
Jump to navigation Jump to search
Line 10: Line 10:
 
*In ICS-V5 and V6 it's just the string value used by the component to form header lines.
 
*In ICS-V5 and V6 it's just the string value used by the component to form header lines.
 
*In ICS-V7 and later its value may also trigger charset conversion depending on whether property ConvertToCharset is set or not.
 
*In ICS-V7 and later its value may also trigger charset conversion depending on whether property ConvertToCharset is set or not.
* With ANSI compilers and ConvertToCharset set to TRUE the component converts MailMessage.Text and header lines from current, system ANSI codepage to the charset specified.
+
* With ANSI compilers and [[TSmtpCli.ConvertToCharset | '''ConvertToCharset''']] set to TRUE the component converts MailMessage.Text and header lines from current, system ANSI codepage to the charset specified.
 
* With UNICODE compilers ConvertToCharset is always ignored and the UnicodeString is converted to the charset specified.
 
* With UNICODE compilers ConvertToCharset is always ignored and the UnicodeString is converted to the charset specified.
 
Since ICS-V7 the component checks whether a charset is supported or not and raises an SmtpException on assignment of an unsupported charset!  
 
Since ICS-V7 the component checks whether a charset is supported or not and raises an SmtpException on assignment of an unsupported charset!  

Revision as of 11:27, 29 May 2009

Main page -> ICS component reference -> TSmtpCli -> CharSet

Definition

property TSmtpCli.CharSet : string;

Description

Describes the content-type charset or charset of MIME inline encoded header lines.

  • In ICS-V5 and V6 it's just the string value used by the component to form header lines.
  • In ICS-V7 and later its value may also trigger charset conversion depending on whether property ConvertToCharset is set or not.
  • With ANSI compilers and ConvertToCharset set to TRUE the component converts MailMessage.Text and header lines from current, system ANSI codepage to the charset specified.
  • With UNICODE compilers ConvertToCharset is always ignored and the UnicodeString is converted to the charset specified.

Since ICS-V7 the component checks whether a charset is supported or not and raises an SmtpException on assignment of an unsupported charset! Assigning an empty string sets the default system charset silently.

Example

 SmtpCli1.CharSet := 'iso-8859-1';
 SmtpCli1.CharSet := 'utf-8';  

See also