Subject: Re: (i18n 72) paper presented to WG11

From: [email-masked] (Kim F. Storm)
Date: 13 Feb 91 12:04:38 MET (Wed)

I agree with Keld that using the names in the charmap is an excellent
way to write portable strings (provided we can agree on the character
names to use in the charmap).

The problem with introducing these general strings is how to merge
them into existing languages and utilities.  Keld uses the example

           "s<o/>ndag"

which would need some currently unspecified functions to interpret
(e.g. for printing or pattern matching).

Let us take this a step further and play with the idea of using the
following syntax in C:

	char *str = "s\<o/>ndag";

There are some possible interpretations here:

	1. The \<o/> character is substituted into the string at
	   compile time.  This would be a trivial addition to the
	   compiler, but it would not ensure portability of the
	   binary, since it would be "linked" with the charmap
	   of the system where the program was compiled.
	   
	2. It can still be compiled in some "tricky" way and resolved
	   at LOAD time.  If COFF format is used, I would guess that
	   a "charmap" section could be used to resolve this.
	   
	3. Compile the \< token into an otherwise unused character
	   code and use that at run-time to trigger "on the fly"
	   substitution in all STANDARD routines operating on strings,
	   e.g. strcpy and printf.

	4. Forget the whole thing, and write a complete new set of
	   functions to operate on "portable strings".
	   
From a "normal" programmer's point of view (don't care how it works,
as long as it works...), I would prefer solution #3.

--
Kim F. Storm, Texas Instruments A/S, Denmark.
Chairman of the Danish POSIX WG (S142 u22 A11)