From keld@dkuug.dk Sun Dec 29 00:34:29 1991 Received: by dkuug.dk (5.64+/8+bit/IDA-1.2.8) id AA24530; Sun, 29 Dec 91 00:34:29 +0100 Date: Sun, 29 Dec 91 00:34:29 +0100 From: Keld J|rn Simonsen Message-Id: <9112282334.AA24530@dkuug.dk> To: wg14@dkuug.dk Subject: support for symbolic character names Cc: i18n@dkuug.dk X-Charset: ASCII X-Char-Esc: 29 Here is the paper I presented at the WG14 C meeting in Milano. keld ---- SC22/WG14 N197 Title: Support for Symbolic Character Names in MSE Source: Keld Simonsen, DS Status: Expert Contribution Date: 1991-12-12 Locales are often specified with symbolic character names, to improve portability across different coded character sets. Two new functions and a notation for character constants are proposed to utilize these specifications, to provide greater portability of program sources. wchar_t scntowc(const char *scn); The scntowc function finds the widechar value for the symbolic character name scn in the current locale. The scntowc function returns the widechar value for the symbolic character name scn. If no widechar value is found, it returns EOF. size_t wctoscn(wchar_t wc, int pos, char *scn, size_t maxl); The wctoscn function locates the pos number symbolic character name of the current locale for the widechar value wc. There may be more than one name for each wc. The wctoscn function copies the symbolic character name found to the character string scn, at most maxl bytes. The return value is the number of bytes copied to scn. If no symbolic character name is found, the return value is zero. In wchar_t character and string constants, occurrances of the form \ are replaced with the scntowc(scn) value.