Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIScriptableUnicodeConverter Interface Reference

This interface is a unicode encoder for use by scripts. More...

import "nsIScriptableUConv.idl";

Inheritance diagram for nsIScriptableUnicodeConverter:
Inheritance graph
[legend]
Collaboration diagram for nsIScriptableUnicodeConverter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

ACString ConvertFromUnicode (in AString aSrc)
 Converts the data from Unicode to one Charset.
ACString Finish ()
 Returns the terminator string.
AString ConvertToUnicode (in ACString aSrc)
 Converts the data from one Charset to Unicode.
AString convertFromByteArray ([const, array, size_is(aCount)] in octet aData, in unsigned long aCount)
 Converts an array of bytes to a unicode string.
void convertToByteArray (in AString aString, out unsigned long aLen,[array, size_is(aLen), retval] out octet aData)
 Convert a unicode string to an array of bytes.
nsIInputStream convertToInputStream (in AString aString)
 Converts a unicode string to an input stream.

Public Attributes

attribute string charset
 Current character set.

Detailed Description

This interface is a unicode encoder for use by scripts.

8/Jun/2000

Author:
Makoto Kato [m_kat.nosp@m.o@ga.nosp@m.2.so-.nosp@m.net..nosp@m.ne.jp]

Definition at line 55 of file nsIScriptableUConv.idl.


Member Function Documentation

AString nsIScriptableUnicodeConverter::convertFromByteArray ( [const, array, size_is(aCount)] in octet  aData,
in unsigned long  aCount 
)

Converts an array of bytes to a unicode string.

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.

void nsIScriptableUnicodeConverter::convertToByteArray ( in AString  aString,
out unsigned long  aLen,
[array, size_is(aLen), retval] out octet  aData 
)

Convert a unicode string to an array of bytes.

Finish does not need to be called.

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.

Converts the data from one Charset to Unicode.

Returns the terminator string.

Should be called after ConvertFromUnicode() and appended to that function's return value.


Member Data Documentation

Current character set.

Exceptions:
NS_ERROR_UCONV_NOCONVThe requested charset is not supported.

Definition at line 103 of file nsIScriptableUConv.idl.


The documentation for this interface was generated from the following file: