.de Sc
\\s-1\\$1\\s0\\$2
..
.ds cA 1999/140
.ds aR \s-1PSARC\s0
.LP
.so ../../amac
.Co
.ds LF \fI\*(aR/\*(cA\fP
.ds RF \fICopyright 1999 Sun Microsystems\fP
.if n .ds CF
.IP \fBSubject:\fP 15
Codeset Independent ldterm(7M) and stty(1)
.IP "\fBSubmitted by:\fP" 15
Ienup Sung
.IP \fBFile:\fP 15
\*(aR/\*(cA/opinion.ms
.IP \fBDate:\fP 15
July 21st, 1999
.IP "\fBCommittee:\fP" 15
Joseph Kowalski,
Tim Marsland,
Terrence Miller,
David Robinson,
Glenn Skinner.
.IP "\fBSteering Committee:\fP" 15
Solaris Operating Environment
.br
soesc-opinion@scs.eng
.sp
Operating Systems and Networking
.br
onsc@eng
.pn 2
.NH
Summary
.LP
The current ldterm(7M) and stty(1) implementations are EUC codeset
specific and contain EUC representation dependencies. This project
is to provide a codeset independent ldterm(7M) module and stty(1)
command.  Currently, non-EUC locales push a pair of code conversion
modules around the ldterm module to circumvent this restriction.
This procedure is quite cumbersome and error prone.
.NH
Decision & Precedence Information
.LP
The project is approved as specified in reference [1],
but as modified by the required technical changes listed
in Appendix A below.
.LP
The project may be delivered in a minor release of Solaris.
.NH
Interfaces
.LP
The project exports the following interfaces.
.if n .ne 14
.if t .ne 3
.TS H
box;
c s s
l | l | l.
Interfaces Exported
_
Interface	Classification	Comments
_
.TH
stty(1)	Stable	T{
defeuwc behavior in non-EUC locales.
T}
ldterm(7m)	Stable	T{
Expanded definition of EUC_WSET and EUC_WGET in non-EUC locales.
T}
T{
ldterm(7m)
\ \ CSDATA_SET
\ \ CSDATE_GET
T}	T{
Consolidation Private
T}	T{
ioctls only used by stty(1)
T}
ldterm.dat	Sun Private	T{
Data file name and format as defined in [1].
T}
.TE
.NH
Opinion
.LP
Originally this project was presented in a form considerably different
than the final proposal.  That design downloaded large amounts of data
through multiple calls to new ldterm ioctls.  The committee had two
major issues with this implementation.
.IP 1.
The switch between codesets was not atomic.  The behavior was not well
defined when a codeset width table was partially downloaded.
.IP 2.
The large downloaded codeset width tables were per-stream and not
shared.  This could easily result in massive amounts of physical
kernel memory being consumed.
.LP
The revised proposal addressed both of these concerns.  It is worth
noting that although the committee suggested several possible ways
to address its concerns, the project team returned with an implementation
which was not discussed.  This is mentioned here because project teams
have expressed concern about being constrained by solutions suggested
by the committee.  This should not be the case and wasn't with this
project.
.LP
The committee was still concerned by the physical memory consumed by
the project which is potentially 280 kilobytes but is only 16 kilobytes
in the initial implementation.  The additional memory will be consumed
as additional Unicode code-planes are defined.  After consideration,
the committee decided that because the memory consumption was not extremely
excessive and much of it was deferred in time the project was acceptable
as proposed.  However, this concern is captured as a Technical Change
Advised.
.LP
Finally, the committee was insistent that stty options continue to have
the same semantics as before.  This discussion resulted in the two
Technical Changes Required for this project.
.NH
Minority Opinion(s)
.LP
None.
.NH
Advisory Information
.LP
None.
.NH
Appendices
.NH 2
Appendix A: Technical Changes Required
.LP
.RS
.IP 1.
The project must support the existing ``stty -g'' behavior.
Specifically, that is the ability to produce output in a form
appropriate as an argument to another stty command.
With this project, that should include the value of the non-EUC code set.
.IP 2.
The output of `stty -a` should report the ``code set width data''
name.  This is usually the locale name, but the label ``locale'' should not
used in the stty output to allow a future project which may more correctly
require the ``locale'' label.  Differences could arise where sub-locales
exist or character sets are shared among locales.  The committee suggested
(but did not require) the identifier ``csdata'' be used.
.RE
.NH 2
Appendix B: Technical Changes Advised
.LP
.RS
.IP 1.
The project is advised to not lock down physical memory for a large
Unicode width table when not required.  Possible implementations
include using pagable kernel memory or using an optionally loadable
module.
.RE
.NH 2
Appendix C: Reference Material
.LP
Unless stated otherwise, path names are relative to the case
directory \*(aR/\*(cA.
.IP 1.
Project Specification (as if for a fast-track).
.br
File:
commit.materials/spec.
.IP 2.
Technical Description
.br
File:
commit.materials/ldterm-csi.txt
.IP 3.
Diff-marked man page.
.br
File:
commit.materials/stty.1
.IP 4.
Diff-marked man page.
.br
File:
commit.materials/ldterm.7m
.IP 5.
Project Plan
.br
File:
incept.materials/ldterm_csi_projplan.ps
.IP 6.
One Pager
.br
File:
990223_ienup.sung
.IP 7.
Dependency Discussion.
.br
File:
incept.materials/stty-euc-dependency.txt
.IP 8.
Dependency Discussion.
.br
File:
incept.materials/ldterm-euc-dependency.txt
.IP 9.
Background Codeset Information.
.br
File:
commit.materials/csicookbookappendix.pdf
.IP 10.
Solaris Internationalization Guide for Developers Overview of en_US.UTF-8 Locale Support
.br
File:
User documentation (current).
