Search completed in 1.29 seconds.
6 results for "ns_utf16tocstring":
NS_UTF16ToCString
Mozilla › Tech › XPCOM › Reference › String functions › NS UTF16ToCString
<< XPCOM API Reference Summary The NS_UTF16ToCString function converts the value of a nsAString instance from UTF-16 to the specified multi-byte encoding and stores the result in a nsACString instance. #include "nsStringAPI.h" nsresult NS_UTF16ToCString( const nsAString& aSrc, nsCStringEncoding aDestEncoding, nsACString& aDest ); Parameters aSrc [in] A nsAString instance containing the source UTF-16 string to be converted. The source string should be encoded using the host byte order. aDestEncoding [in] The character encoding of the destination string. See nsCStringEncoding for the set of values that can be passed for this parameter. aDest [out] A nsACString instance that will contain the result of the conversion. ...
...nsAString instance containing the source UTF-16 string to be converted. The source string should be encoded using the host byte order. aDestEncoding [in] The character encoding of the destination string. See nsCStringEncoding for the set of values that can be passed for this parameter. aDest [out] A nsACString instance that will contain the result of the conversion. Return Values The NS_UTF16ToCString function returns NS_OK if successful. Otherwise, it returns an error code. The set of possible error codes is currently unspecified. Example Code // Convert UTF-16 (or UCS-2) string to UTF-8 void CopyUTF16toUTF8(const nsAString& in, nsACString& out) { NS_UTF16ToCString(in, NS_CSTRING_ENCODING_UTF8, out); } History This function was frozen for Mozilla 1.7. See bug bug 239123 for...
Index
Mozilla › Tech › XPCOM › Index
1192 nsCountedRef nsCountedRef<t> is a template class implementing an object that takes a strong reference to a reference-counted resource that must be released, typically on destruction of the object.</t> 1193 nsDependentCString Class Declaration 1194 nsDependentCString external NeedsContent, Reference, Reference(2), strings ...
...a low-level API. 1252 NS_StringSetData XPCOM, XPCOM API Reference The NS_StringSetData function copies data into the string's internal buffer. This is a low-level API. 1253 NS_StringSetDataRange XPCOM, XPCOM API Reference The NS_StringSetDataRange function copies data into a section of the string's internal buffer. This is a low-level API. 1254 NS_UTF16ToCString XPCOM, XPCOM API Reference The NS_UTF16ToCString function converts the value of a nsAString instance from UTF-16 to the specified multi-byte encoding and stores the result in a nsACString instance. 1255 nsGetModuleProc This function prototype provides the XPCOM entry-point into a module. 1256 nsIAbCard/Thunderbird3 Interfaces, Interfaces:Scriptable, ...
nsCStringEncoding
Mozilla › Tech › XPCOM › Reference › Glue classes › nsCStringEncoding
NS_CSTRING_ENCODING_ASCII Conversion between ASCII and UTF-16 assumes that all bytes in the source string are 7-bit ASCII and can be inflated to UTF-16 by inserting null bytes. Reverse conversion is done by truncating every other byte. The conversion may result in loss and/or corruption of information if the strings do not strictly contain ASCII data. NS_CSTRING_ENCODING_UTF8 Conversion between UTF-8 and UTF-16 is non-lossy. ...
...TIVE_FILESYSTEM Conversion from UTF-16 to the native filesystem charset may result in a loss of information. No attempt is made to protect against data loss in this case. The native filesystem charset applies to strings passed to the "Native" method variants on nsIFile and nsILocalFile. History This enumeration was frozen for Mozilla 1.7. See bug 239123 for details. See Also NS_CStringToUTF16, NS_UTF16ToCString ...
nsIFile
Mozilla › Tech › XPCOM › Reference › Interface › nsIFile
pecified by CP_ACP). The word "Native" appears in the name of methods that operate on or return strings encoded in the native character set. A string containing characters encoded in the native character set cannot be safely passed to JavaScript via XPConnect. ...
...e, the "native" methods and attributes are not scriptable. XPCOM provides the string conversion functions NS_CStringToUTF16 and NS_UTF16ToCString, which can be used to convert a string between UTF-16 and the native character encoding. This interface was frozen for Gecko 1.0. See bug 129279 for details. ...
XPCOM glue classes
Mozilla › Tech › XPCOM › Reference › Glue classes
lass implementing an object that takes a strong reference to a reference-counted resource that must be released, typically on destruction of the object.</t>nsCStringClass DeclarationnsCString externalClass DeclarationnsCStringContainer (External)Class Declaration nsCStringEncodingThe nsCStringEncoding enumeration describes the set of character encodings understood by the NS_CStringToUTF16 and NS_UTF16ToCString functions.nsDependentCStringClass DeclarationnsDependentCString externalClass DeclarationnsDependentCSubstringClass DeclarationnsDependentCSubstring externalClass DeclarationnsDependentStringClass DeclarationnsDependentString externalClass DeclarationnsDependentSubstringClass DeclarationnsDependentSubstring externalClass DeclarationnsEmbedCStringThe nsEmbedCString concrete class provides a way to...
XPCOM string functions
Mozilla › Tech › XPCOM › Reference › String functions
l API.NS_StringInsertDataThe NS_StringInsertData function appends data to the existing value of a nsACString instance. This is a low-level API.NS_StringSetDataThe NS_StringSetData function copies data into the string's internal buffer. This is a low-level API.NS_StringSetDataRangeThe NS_StringSetDataRange function copies data into a section of the string's internal buffer. This is a low-level API.NS_UTF16ToCStringThe NS_UTF16ToCString function converts the value of a nsAString instance from UTF-16 to the specified multi-byte encoding and stores the result in a nsACString instance. ...