diff options
Diffstat (limited to 'WWW/Library/Implementation/UCMap.h')
-rw-r--r-- | WWW/Library/Implementation/UCMap.h | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/WWW/Library/Implementation/UCMap.h b/WWW/Library/Implementation/UCMap.h index 5a8c1210..23d88515 100644 --- a/WWW/Library/Implementation/UCMap.h +++ b/WWW/Library/Implementation/UCMap.h @@ -1,4 +1,3 @@ - #ifndef UCMAP_H #define UCMAP_H @@ -33,16 +32,51 @@ extern int UCTransCharStr PARAMS(( extern UCode_t UCTransToUni PARAMS(( char ch_in, int charset_in)); -extern int UCGetLYhndl_byMIME PARAMS(( - CONST char * p)); extern int UCGetRawUniMode_byLYhndl PARAMS(( int i)); +extern int UCGetLYhndl_byMIME PARAMS(( + CONST char * p)); /* returns -1 if name not recognized */ +extern int safeUCGetLYhndl_byMIME PARAMS(( + CONST char * p)); /* returns LATIN1 if MIME name not recognized */ extern int UCLYhndl_for_unspec; extern int UCLYhndl_for_unrec; extern int UCLYhndl_HTFile_for_unspec; extern int UCLYhndl_HTFile_for_unrec; +/* easy to type: */ +#define LATIN1 UCGetLYhndl_byMIME("iso-8859-1") + +/* +In general, Lynx translates letters from document charset to display charset. +If document charset is not specified or not recognized by Lynx, we fall back +to different assumptions below, read also lynx.cfg for info. + +UCLYhndl_for_unspec - assume this as charset for documents that don't + specify a charset parameter in HTTP headers or via META + this corresponds to "assume_charset" + +UCLYhndl_HTFile_for_unspec - assume this as charset of local file + this corresponds to "assume_local_charset" + +UCLYhndl_for_unrec - in case a charset parameter is not recognized; + this corresponds to "assume_unrec_charset" + +UCLYhndl_HTFile_for_unrec - the same but only for local files, + currently not used. + + +current_char_set - this corresponds to "display charset", + declared in LYCharSets.c and really important. + +All external charset information is available in so called MIME format. +For internal needs Lynx uses charset handlers as integers +from UCGetLYhndl_byMIME(). However, there is no way to recover +from user's error in configuration file lynx.cfg or command line switches, +those unrecognized MIME names are assumed as LATIN1 (via safeUCGetLYhndl...). +*/ + + #define UCTRANS_NOTFOUND (-4) #endif /* UCMAP_H */ |