From seki@sysrap.cs.fujitsu.co.jp Wed Jan  8 10:24:29 1992
Received: from mcsun.EU.net by dkuug.dk via EUnet with SMTP (5.64+/8+bit/IDA-1.2.8)
	id AA15845; Wed, 8 Jan 92 10:24:29 +0100
Received: by mcsun.EU.net via EUnet;
	id AA11281 (5.65a/CWI-2.130); Wed, 8 Jan 1992 10:24:34 +0100
Received: from uunet.uu.net (via LOCALHOST.UU.NET) by relay1.UU.NET with SMTP 
	(5.61/UUNET-internet-primary) id AA06210; Wed, 8 Jan 92 04:21:24 -0500
Received: from fai.UUCP by uunet.uu.net with UUCP/RMAIL
	(queueing-rmail) id 042106.9714; Wed, 8 Jan 1992 04:21:06 EST
Received: by fai.fai.com; id AA13732; Wed, 8 Jan 92 01:19:20-1795
Received: from fdm.fujitsu.co.jp (fdm.ARPA) by a50.fujitsu.co.jp (4.12/6.4J.4 *** FUJITSU National Gateway ***)
	id AA02352; Wed, 8 Jan 92 18:01:14 JST
Received: from [133.161.1.9] by fdm.fujitsu.co.jp (5.65/6.4J.6)
	id AA07232; Wed, 8 Jan 92 18:15:42 +0900
Received: by spad.sysrap.cs.fujitsu.co.jp (/\==/\ Smail3.1.24.1 #24.2)
	id <m0l1ZGZ-000DojC@spad.sysrap.cs.fujitsu.co.jp>; Wed, 8 Jan 92 18:08 JST
Date: Wed, 8 Jan 92 18:06:25 JST
From: Masahiro SEKIGUCHI <seki@sysrap.cs.fujitsu.co.jp>
Return-Path: <seki@sysrap.cs.fujitsu.co.jp>
Message-Id: <9201080906.AA00641@seki.sysrap.cs.fujitsu.co.jp>
To: wg14@dkuug.dk, i18n@dkuug.dk
Subject: Re: (SC22WG14.166) Re: support for symbolic character names
References: <9201061934.AA16247@dkuug.dk>
X-Charset: ASCII
X-Char-Esc: 29

> > What is the purpose of these two functions?  Or, in other words,
> > what kind of application will use them?

> The mechanism is to support portability of international C programs.

Great.

> It is a lowercase-o-with-stroke. If I want to write a portable
> program, which tests for this letter, then it is very difficult.

O.K.  I agree with you on the point ``it is very difficult.''
but, I don't agree the idea of ``a facility to do such a job
easier will increase international portability of applications.''

> It depends on the execution character set. In the one I am really
> using now (IBM865) it is one value, in ISO8859-1 it is another,
> and in MacIntosh it is yet another.

And, in my system, there is no such character.

My point is following: If an application *must* check whether a
character is an o-with-stroke, it *cannot* be internationally
portable.

With your proposal, you could write a ``pseudo-portable'' program which
tests against o-with-stroke like:

	if (wc == L'\<o/>') ...

but it will cause an error like "character(s) specified by a symbolic
name notation is not avalable."  Is this a portable program?

Or, with your function version, your could write:

	if (wc == scntowc("<o/>")) ...

This version will be compiled successfully in all countries, but will
or will not work appropriately...  On my system in Japanese locale,
scntowc("<o/>") will return WEOF, and ``...'' part will never be
executed.  If this code is used, for example, as a part of menu driver,
I will not able to select an item represented by o-with-stroke.

My solution to menu drivers is using messaging facility.

For example, with XPG3 style messing facility, I can write (This code
might look lengthy, but the first three lines can be done at the
startup phase.) :

	item_3_selector = catgets(cd, SET_MENU, MSG_ITEM_3_SELECTOR);
	mbtowc(NULL, NULL, 0);
	mbtowc(&item_3_wchar, item_3_selector, strlen(item_3_selector));
	if (wc == item_3_wchar) ...

In my code, the character wc is compared against is determined by
locale, so users can select items by their most natural keys, e.g.,

for English:

	E) EXECUTE
	Q) QUIT
	ENTER SELECTION:

for German:

	A) AUSFUEHREN
	B) BEENDEN
	AUSWAHL ANGEBEN:

and you can use o-with-stroke for Danish if you want.

>The mechanism is much in line with current documenter software
>like TeX or SGML that has such symbolic names for "weird" characters.

Yes.  We can use such names safely in TeX, because TeX defines its own
codeset (and because it supplies public doman fonts. :-)  The case is
different from C applications.
