Module Name: src
Committed By: christos
Date: Wed Feb 13 22:17:13 UTC 2013
Modified Files:
src/lib/libc/gen: vis.3
Log Message:
multi-byte doc from J.R. Oldroyd
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/gen/vis.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/gen/vis.3
diff -u src/lib/libc/gen/vis.3:1.34 src/lib/libc/gen/vis.3:1.35
--- src/lib/libc/gen/vis.3:1.34 Sat Dec 15 02:34:24 2012
+++ src/lib/libc/gen/vis.3 Wed Feb 13 17:17:12 2013
@@ -1,4 +1,4 @@
-.\" $NetBSD: vis.3,v 1.34 2012/12/15 07:34:24 wiz Exp $
+.\" $NetBSD: vis.3,v 1.35 2013/02/13 22:17:12 christos Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)vis.3 8.1 (Berkeley) 6/9/93
.\"
-.Dd December 14, 2012
+.Dd February 13, 2013
.Dt VIS 3
.Os
.Sh NAME
@@ -394,6 +394,26 @@ meta characters as
.Ql M-C ) .
With this flag set, the encoding is
ambiguous and non-invertible.
+.Sh MULTIBYTE CHARACTER SUPPORT
+These functions support multibyte character input.
+The encoding conversion is influenced by the setting of the
+LC_CTYPE environment variable which defines the set of characters
+that can be copied without encoding.
+.Pp
+When 8-bit data is present in the input, LC_CTYPE must be set to
+the correct locale or to the C locale.
+If the locales of the data and the conversion are mismatched,
+multibyte character recognition may fail and encoding will be performed
+byte-by-byte instead.
+The result of encoding using one of these functions followed by
+decoding using the corresponding
+.Xr unvis 3
+function is unlikely to return the same input data in this case.
+.Sh ENVIRONMENT
+.Bl -tag -width ".Ev LC_CTYPE"
+.It Ev LC_CTYPE
+Specify the locale of the input data.
+Set to C if the input data locale is unknown.
.Sh ERRORS
The functions
.Fn nvis
@@ -455,4 +475,10 @@ The buffer size limited versions of the
and
.Fn strsnvisx Pc
appeared in
-.Nx 6.0 .
+.Nx 6.0
+and
+.Fx 9.2 .
+Myltibyte character support was added in
+.Nx 7.0
+and
+.Fx 9.2 .