diff --git a/mozilla/include/libi18n.h b/mozilla/include/libi18n.h index 282814e5b7d..c65bda97f4d 100644 --- a/mozilla/include/libi18n.h +++ b/mozilla/include/libi18n.h @@ -2692,6 +2692,30 @@ INTL_ResourceCharSet(void); /*@}*/ /*=======================================================*/ + +/* Definition for the charset ID selector. + */ +typedef enum { + INTL_FileNameCsidSel = 1, + INTL_DefaultTextWidgetCsidSel = 2 +} INTL_CharSetID_Selector; + +/* Typedef for charset ID. + */ +typedef int16 INTLCharSetID; + +/** + * Get charset ID using a given selector. + * + * Using a given selector, this returns a charset ID. + * Designed to retrieve a non-context dependent charset ID (e.g file system). + * + * @param selector Specification for a charset ID to get. + * @return Charset ID for the input selector. Returns CS_DEFUALT in case of error (e.g. selector invalid). + */ + +INTLCharSetID INTL_GetCharSetID(INTL_CharSetID_Selector selector); + XP_END_PROTOS #endif /* INTL_LIBI18N_H */ diff --git a/mozilla/lib/libi18n/fe_ccc.c b/mozilla/lib/libi18n/fe_ccc.c index b55412499f8..e23285b3b24 100644 --- a/mozilla/lib/libi18n/fe_ccc.c +++ b/mozilla/lib/libi18n/fe_ccc.c @@ -1374,3 +1374,9 @@ void INTL_SetCCCCvtflag_SendHankakuKana(CCCDataObject obj, XP_Bool flag) } } #endif /* MOZ_MAIL_NEWS */ + + +INTLCharSetID INTL_GetCharSetID(INTL_CharSetID_Selector selector) +{ + return FE_GetCharSetID(selector); +} \ No newline at end of file