Gammu internals
1.38.0
|
Functions | |
size_t | UnicodeLength (const unsigned char *str) |
char * | DecodeUnicodeString (const unsigned char *src) |
char * | DecodeUnicodeConsole (const unsigned char *src) |
void | DecodeUnicode (const unsigned char *src, char *dest) |
void | EncodeUnicode (unsigned char *dest, const char *src, size_t len) |
void | ReadUnicodeFile (unsigned char *Dest, const unsigned char *Source) |
void | CopyUnicodeString (unsigned char *Dest, const unsigned char *Source) |
gboolean | EncodeUTF8QuotedPrintable (char *dest, const unsigned char *src) |
void | DecodeUTF8QuotedPrintable (unsigned char *dest, const char *src, size_t len) |
int | EncodeWithUTF8Alphabet (unsigned long src, unsigned char *ret) |
int | DecodeWithUTF8Alphabet (const unsigned char *src, wchar_t *dest, size_t len) |
gboolean | DecodeHexUnicode (unsigned char *dest, const char *src, size_t len) |
void | EncodeHexUnicode (char *dest, const unsigned char *src, size_t len) |
gboolean | mywstrncmp (unsigned const char *a, unsigned const char *b, int num) |
unsigned char * | mywstrstr (unsigned const char *haystack, unsigned const char *needle) |
gboolean | mywstrncasecmp (unsigned const char *a, unsigned const char *b, int num) |
gboolean | EncodeUTF8 (char *dest, const unsigned char *src) |
void | DecodeUTF8 (unsigned char *dest, const char *src, size_t len) |
gboolean | DecodeHexBin (unsigned char *dest, const unsigned char *src, size_t len) |
Unicode manipulation functions. Please note that most of functions here rely on initialised libc char conversions, what is usually done by locales initialisation. Recommended way for doing this is calling GSM_InitLocales.
void CopyUnicodeString | ( | unsigned char * | Dest, |
const unsigned char * | Source | ||
) |
Copies unicode string.
Definition at line 1192 of file coding.c.
Referenced by DUMMY_AddFilePart(), DUMMY_AddFolder(), DUMMY_GetAlarm(), DUMMY_GetSMSFolders(), DUMMY_SetAlarm(), GSM_DecodeNokiaRTTLRingtone(), GSM_DecodeVCALENDAR_VTODO(), GSM_DecodeVCARD(), GSM_DecodeVNOTE(), GSM_EncodeSMS30MultiPartSMS(), GSM_EncodeVCARD(), GSM_PhonebookGetEntryName(), GSM_RingtoneConvert(), loadre(), N71_65_DecodePhonebook(), N71_65_EncodePhonebookFrame(), NOKIA_EncodeDateTime(), and VCALGetTextPart().
gboolean DecodeHexBin | ( | unsigned char * | dest, |
const unsigned char * | src, | ||
size_t | len | ||
) |
Decode hex encoded binary text.
Definition at line 411 of file coding.c.
References DecodeWithHexBinAlphabet(), FALSE, and TRUE.
gboolean DecodeHexUnicode | ( | unsigned char * | dest, |
const char * | src, | ||
size_t | len | ||
) |
Decodes string from hex quoted unicode.
Definition at line 382 of file coding.c.
References DecodeWithHexBinAlphabet(), FALSE, and TRUE.
void DecodeUnicode | ( | const unsigned char * | src, |
char * | dest | ||
) |
Converts string from unicode to local charset.
Definition at line 223 of file coding.c.
References DecodeWithUnicodeAlphabet().
Referenced by DecodeUnicodeConsole(), DecodeUnicodeString(), and GSM_PackSemiOctetNumber().
char* DecodeUnicodeConsole | ( | const unsigned char * | src | ) |
Converts string to console charset.
Definition at line 256 of file coding.c.
References _GSM_Debug_Info::coding, DecodeUnicode(), EncodeUTF8(), and GSM_global_debug.
Referenced by ReadVCALText().
char* DecodeUnicodeString | ( | const unsigned char * | src | ) |
Converts string to locale charset.
Definition at line 245 of file coding.c.
References DecodeUnicode().
Referenced by DUMMY_GetFSFilePath(), GSM_DecodeNokiaProfile(), GSM_DecodePDUFrame(), GSM_DecodeSMSFrame(), GSM_DecodeSMSFrameText(), GSM_DecodeVCALENDAR_VTODO(), GSM_DecodeVCARD(), GSM_EncodeEMSSound(), GSM_EncodeNokiaRTTLRingtone(), GSM_EncodeSMS30MultiPartSMS(), GSM_EncodeSMSFrame(), GSM_EncodeSMSFrameText(), GSM_EncodeURLFile(), GSM_EncodeVCARD(), GSM_LinkSMS(), GSM_SaveRingtoneRttl(), GSM_TweakInternationalNumber(), loadbin(), loadgif(), loadmmf(), loadpuremidi(), loadre(), N71_65_DecodePhonebook(), N71_65_PB_CopyString(), NOKIA_EncodeDateTime(), NOKIA_EncodeWAPMMSSettingsSMSText(), ReadVCALDate(), and savebin().
void DecodeUTF8 | ( | unsigned char * | dest, |
const char * | src, | ||
size_t | len | ||
) |
Decode text from UTF-8.
Definition at line 1947 of file coding.c.
References DecodeWithUTF8Alphabet(), and EncodeWithUnicodeAlphabet().
Referenced by DecodeXMLUTF8(), and ReadVCALText().
void DecodeUTF8QuotedPrintable | ( | unsigned char * | dest, |
const char * | src, | ||
size_t | len | ||
) |
Decodes UTF-8 quoted printable string.
Definition at line 1911 of file coding.c.
References DecodeWithHexBinAlphabet(), DecodeWithUTF8Alphabet(), EncodeWithUnicodeAlphabet(), and TRUE.
Referenced by ReadVCALText().
int DecodeWithUTF8Alphabet | ( | const unsigned char * | src, |
wchar_t * | dest, | ||
size_t | len | ||
) |
Decodes string from UTF-8.
Definition at line 1866 of file coding.c.
Referenced by DecodeUTF8(), and DecodeUTF8QuotedPrintable().
void EncodeHexUnicode | ( | char * | dest, |
const unsigned char * | src, | ||
size_t | len | ||
) |
Encodes string to hex quoted unicode.
Definition at line 406 of file coding.c.
References EncodeHexBin().
void EncodeUnicode | ( | unsigned char * | dest, |
const char * | src, | ||
size_t | len | ||
) |
Encodes string from local charset to unicode.
Definition at line 301 of file coding.c.
References EncodeWithUnicodeAlphabet().
Referenced by AddEMSText(), DUMMY_DialService(), DUMMY_GetFilePart(), DUMMY_GetFolderListing(), DUMMY_GetNetworkInfo(), DUMMY_GetNextFileFolder(), DUMMY_GetSMSFolders(), DUMMY_GetWAPBookmark(), DUMMY_Initialise(), DUMMY_PreAPICall(), DUMMY_SendFilePart(), GSM_DecodeMMSFileToMultiPart(), GSM_DecodeMultiPartSMS(), GSM_DecodeNokiaProfile(), GSM_DecodeNokiaRTTLRingtone(), GSM_DecodeSMSStatusReportData(), GSM_EncodeMultiPartSMS(), GSM_GetCountryName(), GSM_GetNetworkName(), GSM_ReadBitmapFile(), GSM_ReadRingtoneFile(), GSM_TweakInternationalNumber(), GSM_UnpackSemiOctetNumber(), loadbin(), loadpuremidi(), loadre(), loadrttl(), N71_65_DecodePhonebook(), NOKIA_EncodeDateTime(), NOKIA_GetDefaultCallerGroupName(), PHONE_FindDataFile(), and PHONE_GetSMSFolders().
gboolean EncodeUTF8 | ( | char * | dest, |
const unsigned char * | src | ||
) |
Encode text to UTF-8.
Definition at line 1835 of file coding.c.
References EncodeWithUTF8Alphabet(), FALSE, TRUE, and UnicodeLength().
Referenced by DecodeUnicodeConsole(), and NOKIA_EncodeWAPBookmarkSMSText().
gboolean EncodeUTF8QuotedPrintable | ( | char * | dest, |
const unsigned char * | src | ||
) |
Encodes string to UTF-8 quoted printable.
Definition at line 1794 of file coding.c.
References EncodeWithUTF8Alphabet(), FALSE, TRUE, and UnicodeLength().
Referenced by VC_StoreText().
int EncodeWithUTF8Alphabet | ( | unsigned long | src, |
unsigned char * | ret | ||
) |
Encodes string to UTF-8.
Definition at line 1752 of file coding.c.
Referenced by DecodeXMLUTF8(), EncodeUTF8(), and EncodeUTF8QuotedPrintable().
gboolean mywstrncasecmp | ( | unsigned const char * | a, |
unsigned const char * | b, | ||
int | num | ||
) |
Compares two unicode strings case insensitive.
Definition at line 1437 of file coding.c.
Referenced by GSM_DecodeVCALENDAR_VTODO(), INI_FindLastSectionEntry(), and INI_GetValue().
gboolean mywstrncmp | ( | unsigned const char * | a, |
unsigned const char * | b, | ||
int | num | ||
) |
Compares two unicode strings.
Definition at line 1457 of file coding.c.
Referenced by N71_65_EncodePhonebookFrame().
unsigned char* mywstrstr | ( | unsigned const char * | haystack, |
unsigned const char * | needle | ||
) |
Locates unicode substring.
Definition at line 1508 of file coding.c.
References tolowerwchar.
void ReadUnicodeFile | ( | unsigned char * | Dest, |
const unsigned char * | Source | ||
) |
size_t UnicodeLength | ( | const unsigned char * | str | ) |
Returns length of unicode string.
Definition at line 186 of file coding.c.
Referenced by AddEMSText(), DecodeDefault(), DUMMY_AddFilePart(), DUMMY_AddFolder(), EncodeUTF8(), EncodeUTF8QuotedPrintable(), GSM_AddSMS_Text_UDH(), GSM_DecodeLinkedText(), GSM_DecodeNokiaRTTLRingtone(), GSM_DecodeVCARD(), GSM_DecodeVNOTE(), GSM_EncodeAlcatelMultiPartSMS(), GSM_EncodeEMSMultiPartSMS(), GSM_EncodeMultiPartSMS(), GSM_EncodeNokiaRTTLRingtone(), GSM_EncodeSMS30MultiPartSMS(), GSM_EncodeSMSFrameText(), GSM_EncodeVCARD(), GSM_Find_Free_Used_SMS2(), GSM_LinkSMS(), GSM_PackSemiOctetNumber(), GSM_PhonebookGetEntryName(), GSM_SMSCounter(), loadre(), N71_65_EncodePhonebookFrame(), NOKIA_EncodeDateTime(), NOKIA_EncodeWAPMMSSettingsSMSText(), ReadVCALText(), and VC_StoreText().