nsIScriptableUnicodeConverter
| IID: | 1ea19c6c-c59f-4fd7-9fc7-151e946baca0 |
| Inherits From: | nsISupports |
This interface is a unicode encoder for use by scripts
This interface is implemented by the following components:
Properties
char* charset
Current character set.
Methods
AString convertFromByteArray ( arrayof PRUint8 data , PRUint32 count )
ACString ConvertFromUnicode ( AString src )
void convertToByteArray ( AString string , out PRUint32 len , out arrayof PRUint8 data )
nsIInputStream convertToInputStream ( AString string )
AString ConvertToUnicode ( ACString src )
ACString Finish ( )
AString convertFromByteArray ( arrayof PRUint8 data , PRUint32 count )
Converts an array of bytes to a unicode string.
- Arguments:
- data
- count
ACString ConvertFromUnicode ( AString src )
Converts the data from Unicode to one Charset. Returns the converted string. After converting, Finish should be called and its return value appended to this return value.
- Arguments:
- src
void convertToByteArray ( AString string , out PRUint32 len , out arrayof PRUint8 data )
Convert a unicode string to an array of bytes. Finish does not need to be called.
- Arguments:
- string
- len
- data
nsIInputStream convertToInputStream ( AString string )
Converts a unicode string to an input stream. The bytes in the stream are encoded according to the charset attribute. The returned stream will be nonblocking.
- Arguments:
- string
AString ConvertToUnicode ( ACString src )
Converts the data from one Charset to Unicode.
- Arguments:
- src
Returns the terminator string. Should be called after ConvertFromUnicode() and appended to that function's return value.
Reference documentation is generated from Mozilla's source.
