aboutsummaryrefslogblamecommitdiff
path: root/ja_JP.eucJP/man/man4/utf2.4
blob: 17bf47f2eb358581d9effe7fb89c2b05f3aed5c8 (plain) (tree)




























































































                                                                              
.\" Copyright (c) 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Paul Borman at Krystal Technologies.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	@(#)utf2.4	8.1 (Berkeley) 6/4/93
.\" jpman %Id: utf2.4,v 1.3 1999/08/18 16:40:05 horikawa Stab %
.\"
.Dd June 4, 1993
.Dt UTF2 4
.Os
.Sh 名称
.Nm utf2
.Nd "ユニバーサル文字集合変換フォーマットによる文字のエンコーディング
.Sh 書式
.Nm ENCODING
.Qq UTF2
.Sh 解説
.Nm UTF2
エンコーディングは、
X-Open が提案した多バイト
\s-1FSS-UCS-TF\s+1
(File System Safe Universal Character Set Transformation Format)
エンコーディングに基づいており、
.Nm Bell Labs の Plan 9
で使われているものと同様のものです。
このエンコーディングは 16 bit 以上を表すことができますが、
現在の実装では Unicode Standard によって
定義されている 16 bit までに制限されています。
.Pp
.Nm UTF2
による表現は ASCII の上位互換ですので、
0x00-0x7f は ASCII 文字集合に当てはまります。
0x0080 から 0xffff までの文字の多バイトエンコーディングは、
全体が高位ビットがセットされたバイトで構成されています。
実際のエンコーディングは次の表によって表されています:
.Bd -literal
[0x0000 - 0x007f] [00000000.0bbbbbbb] -> 0bbbbbbb
[0x0080 - 0x07ff] [00000bbb.bbbbbbbb] -> 110bbbbb, 10bbbbbb
[0x0800 - 0xffff] [bbbbbbbb.bbbbbbbb] -> 1110bbbb, 10bbbbbb, 10bbbbbb
.Ed
.Pp
ある値に対して 1 つ以上の表現が存在する場合には
(例えば 0x00 と 0xC0 0x80 と 0xE0 0x80 0x80)、
常に最も短い表現が使われます。
(ただし長い表現のものも正しくデコードされるでしょう。)
.Pp
X-Open は最終的な 3 つのエンコーディングを用意しています:
.Bd -literal
[00000000.000bbbbb.bbbbbbbb.bbbbbbbb] ->
	11110bbb, 10bbbbbb, 10bbbbbb, 10bbbbbb

[000000bb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
	111110bb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb

[0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
	1111110b, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
.Ed
.Pp
これらは提案されている完全な ISO-10646 31 bit Standard のために
用意されていますが、現在は実装されていません。
.Sh 関連項目
.Xr mklocale 1 ,
.Xr setlocale 3