Subject: Re: New options to wsconscfg(8) and wsfontload(8) for uwscons
To: Noriyuki Soda <soda@sra.co.jp>
From: Bang Jun-Young <junyoung@netbsd.org>
List: tech-userlevel
Date: 04/11/2003 00:18:41
On Thu, Apr 10, 2003 at 05:31:06PM +0900, Noriyuki Soda wrote:
> >>>>> On Thu, 10 Apr 2003 01:01:43 +0900,
> 	Bang Jun-Young <junyoung@netbsd.org> said:
> > Patches for wsconscfg(8) and wsfontload(8) are attached in this
> > mail. Any comments will be appreciated.
> 
> I think the name of encodings should be consistent with names used
> by our locale system, if possible.
> 
> i.e. Shouldn't the table be the following?
> 
> } encodings[] = {
> 	{"IBM-437", WSDISPLAY_CHARENC_IBM},	/* not supported in locale */
> 	{"ISO8859-1", WSDISPLAY_CHARENC_ISO},
> 	{"ISO8859-2", WSDISPLAY_CHARENC_ISO2},
> 	{"ISO8859-3", WSDISPLAY_CHARENC_ISO3},
> 	{"ISO8859-4", WSDISPLAY_CHARENC_ISO4},
> 	{"ISO8859-5", WSDISPLAY_CHARENC_ISO5},
> 	{"ISO8859-6", WSDISPLAY_CHARENC_ISO6},
> 	{"ISO8859-7", WSDISPLAY_CHARENC_ISO7},
> 	{"ISO8859-8", WSDISPLAY_CHARENC_ISO8},
> 	{"ISO8859-9", WSDISPLAY_CHARENC_ISO9},
> 	{"ISO8859-10", WSDISPLAY_CHARENC_ISO10},
> 	{"ISO8859-15", WSDISPLAY_CHARENC_ISO15},
> 	{"UTF-8", WSDISPLAY_CHARENC_UTF8},
> 	{"eucCN", WSDISPLAY_CHARENC_EUCCN},
> 	{"eucJP", WSDISPLAY_CHARENC_EUCJP},
> 	{"eucKR", WSDISPLAY_CHARENC_EUCKR},
> 	{"KOI8-R", WSDISPLAY_CHARENC_KOI8},

I'm not sure about what is the best naming scheme to take. Another
candidate is Content-Type: field as seen in the mail header. Noticiable
difference is the use of hyphen in the middle of the names: eucKR vs.
euc-kr (or EUC-KR), ISO8859-1 vs. iso-8859-1 (or ISO-8859-1), etc.

Another method is to accept all of them as valid, e.g.:

	{"iso", WSDISPLAY_CHARENC_ISO},
	{"iso8859-1", WSDISPLAY_CHARENC_ISO},
	{"iso-8859-1", WSDISPLAY_CHARENC_ISO},
	...
 	{"euckr", WSDISPLAY_CHARENC_EUCKR},
 	{"euc-kr", WSDISPLAY_CHARENC_EUCKR},
	...

And case should be insensitive.

Jun-Young

-- 
Bang Jun-Young <junyoung@netbsd.org>