Search completed in 1.32 seconds.
6 results for "ns_cstringtoutf16":
NS_CStringToUTF16
Mozilla › Tech › XPCOM › Reference › String functions › NS CStringToUTF16
<< XPCOM API Reference Summary The NS_CStringToUTF16 function converts the value of a nsACString instance to UTF-16 and stores the result in a nsAString instance. #include "nsStringAPI.h" nsresult NS_CStringToUTF16( const nsACString& aSrc, nsCStringEncoding aSrcEncoding, nsAString& aDest ); Parameters aSrc [in] A nsACString instance containing the source string to be converted. aSrcEncoding [in] The character encoding of the source string. See nsCStringEncoding for the set of values that can be passed for this parameter. aDest [out] A nsAString instance that will contain the result of the conversion. The result will be encoded using the host byte order. Return Values The NS_CStringToUTF16 function returns NS_OK if successful. Otherwise, it returns an error code. The set of po...
...ed for this parameter. aDest [out] A nsAString instance that will contain the result of the conversion. The result will be encoded using the host byte order. Return Values The NS_CStringToUTF16 function returns NS_OK if successful. Otherwise, it returns an error code. The set of possible error codes is currently unspecified. Example Code nsEmbedCString str("hello"); nsEmbedString ustr; NS_CStringToUTF16(str, NS_CSTRING_ENCODING_ASCII, ustr); const PRUnichar *unicharBuf = ustr.get(); History This function was frozen for Mozilla 1.7. See bug bug 239123 for details. See Also nsACString, nsAString, nsCStringEncoding ...
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, R...
...ns, Functions:Frozen, XPCOM, XPCOM API Reference The NS_CStringSetData function copies data into the string's internal buffer. This is a low-level API. 1242 NS_CStringSetDataRange Functions, Functions:Frozen, XPCOM, XPCOM API Reference The NS_CStringSetDataRange function copies data into a section of the string's internal buffer. This is a low-level API. 1243 NS_CStringToUTF16 XPCOM, XPCOM API Reference The NS_CStringToUTF16 function converts the value of a nsACString instance to UTF-16 and stores the result in a nsAString instance. 1244 NS_StringAppendData XPCOM, XPCOM API Reference The NS_StringAppendData function appends data to the existing value of a nsAString instance. This is a low-level API. 1245 NS_StringCloneData ...
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. ...
...CSTRING_ENCODING_NATIVE_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
ected ANSI codepage (specified 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. ...
...XPConnect. Therefore, 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
Ref<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>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 c...
XPCOM string functions
Mozilla › Tech › XPCOM › Reference › String functions
NS_CStringInsertDataThe NS_CStringInsertData function appends data to the existing value of a nsACString instance. This is a low-level API.NS_CStringSetDataThe NS_CStringSetData function copies data into the string's internal buffer. This is a low-level API.NS_CStringSetDataRangeThe NS_CStringSetDataRange function copies data into a section of the string's internal buffer. This is a low-level API.NS_CStringToUTF16The NS_CStringToUTF16 function converts the value of a nsACString instance to UTF-16 and stores the result in a nsAString instance. NS_StringAppendDataThe NS_StringAppendData function appends data to the existing value of a nsAString instance. This is a low-level API.NS_StringCloneDataThe NS_StringCloneData function returns a null-terminated, heap allocated copy of the string's internal buffer...