Function CDM_UtfToExternal
|
|
Definition: | #include <CDM.h> |
---|
|
Prototype: | char * CDM_UtfToExternal(char *encoding, char *str);
|
---|
Arguments: | encoding: The encoding of the initial string. (char *) str: A pointer to the string to be converted. (char *)
|
---|
|
|
Prototype: | char * CDM_UtfToExternal(const Tcl_Encoding encoding, const char *str);
|
---|
Arguments: | encoding: The encoding of the initial string. (Tcl_Encoding) str: A pointer to the string to be converted. (char *)
|
---|
|
|
Description:
char * CDM_UtfToExternal(char *encoding, char *str): |
This function will convert a UTF-8 string (referenced by "str") from
UTF-8 to the specified encoding (provided by the "encoding" parameter). This function will always create and return a new string buffer,
where the converted string will be placed. The user must call CDM_Free
in order to free the returned value, in case it is not needed any more.
The "encoding" parameter can be NULL. In this case, the system encoding
will be used.
char * CDM_UtfToExternal(const Tcl_Encoding encoding, const char *str): |
This function will convert a UTF-8 string (referenced by "str") from
UTF-8 to the specified encoding (provided by the "encoding" parameter).
A valid encoding can be obtained through the Tcl function
Tcl_GetEncoding. This function will always create and return a new string buffer,
where the converted string will be placed. The user must call CDM_Free
in order to free the returned value, in case it is not needed any more.
The "encoding" parameter can be NULL. In this case, the system encoding
will be used.
Return Value:
char * CDM_UtfToExternal(char *encoding, char *str): |
This function will always create and return a new string buffer,
where the converted string will be placed. The user must call CDM_Free
in order to free the returned value, in case it is not needed any more.char * CDM_UtfToExternal(const Tcl_Encoding encoding, const char *str): |
This function will always create and return a new string buffer,
where the converted string will be placed. The user must call CDM_Free
in order to free the returned value, in case it is not needed any more.
Notes:
char * CDM_UtfToExternal(char *encoding, char *str): |
Note that the "encoding" paramemter can be NULL.
In this case, the system encoding will be used.char * CDM_UtfToExternal(const Tcl_Encoding encoding, const char *str): |
Note that the "encoding" paramemter can be NULL.
In this case, the system encoding will be used.
See Also:
char * CDM_UtfToExternal(char *encoding, char *str): |
Tcl_UtfToExternal, Tcl_UtfToExternalDStringchar * CDM_UtfToExternal(const Tcl_Encoding encoding, const char *str): |
Tcl_UtfToExternal, Tcl_UtfToExternalDString,
Tcl_GetEncoding
Generated by: petasis@aias on Wed Aug 16 10:31:57 PM EEST 2006.