Contents Index Topic Contents | ||
Previous Topic: ConnectionType Property Next Topic: MaxStringLength Property |
ConvertedString Property
Returns a converted version of the source string.
Syntax
value=object.ConvertedString(ConversionType, ConversionSource, Source, PostProcess)
Parameters
value Required. A string variable to contain the converted version of the source string. object Required. An object expression that evaluates to an MsChatPr control. ConversionType Required. A variable of enumConversionType type. When ConversionType is set to cvtToUTF8, the property returns the UTF8 version of the source string. The source string must be a regular Unicode BSTR. When ConversionType is set to cvtToUnicode, the property returns the Unicode version of the source string. The source string must be a UTF8 BSTR.
ConversionSource Required. A variable of enumConversionSource type. When ConversionSource is set to cvsNormal, the source parameter can represent any string. For example, an incoming or outgoing text message or a topic can be represented by the source parameter. When ConversionSource is set to cvsNickname, the source parameter represents a nickname.
When ConversionSource is set to cvsChannelName, the source parameter represents a channel Name.
Source Required. A string variable. Because the IRCX protocol uses UTF8 modified strings for extended nicknames and channel names, the control exposes a method to convert strings from Unicode to UTF8 and vice-versa. PostProcess Required. A Boolean value. When set to TRUE, the postprocessing mechanism shown in the following table is used when converting from Unicode to UTF8.
Character Becomes string '\0' "\0" '\' "\\" '\n' "\n" '\r' "\r" '\t' "\t" ' ' "\b" ',' "\c" When converting from UTF8 to Unicode, the postprocessing mechanism shown in the following table is used.
String Becomes Character "\0" '\0' "\\" '\' "\n" '\n' "\r" '\r' "\t" '\t' "\b" ' ' "\c" ',' Remarks
Access is read-only.
Examples
MsChatPr1.ConvertedString(cvtToUTF8, cvsNormal, "Hi Régis, how are you?", FALSE) 'returns "Hi Régis, how are you?"MsChatPr1.ConvertedString(cvtToUnicode, cvsNormal, "Touché\c\bcoulé!", TRUE) 'returns "Touché, coulé!"MsChatPr1.ConvertedString(cvtToUTF8, cvsNickname, "The Säïnt", TRUE) 'returns "'The\bSäïnt"MsChatPr1.ConvertedString(cvtToUnicode, cvsNickname, "'La\bBellä\bXena", TRUE) 'returns "La Bellä Xena"MsChatPr1.ConvertedString(cvtToUTF8, cvsChannelName, "%#Les Français parlent aux Français", TRUE) 'returns "%#Les\bFrançais\bparlent\baux\bFrançais"MsChatPr1.ConvertedString(cvtToUnicode, cvsChannelName, "%&Zûlû", TRUE) 'returns "%&Zûlû"
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.