1 .\" $NetBSD: runidn.1,v 1.4 2014/12/10 04:37:56 christos Exp $
3 .\" Id: runidn.1,v 1.1 2003/06/04 00:27:14 marka Exp
5 .\" Copyright (c) 2000,2001 Japan Network Information Center.
6 .\" All rights reserved.
8 .\" By using this file, you agree to the terms and conditions set forth bellow.
10 .\" LICENSE TERMS AND CONDITIONS
12 .\" The following License Terms and Conditions apply, unless a different
13 .\" license is obtained from Japan Network Information Center ("JPNIC"),
14 .\" a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
15 .\" Chiyoda-ku, Tokyo 101-0047, Japan.
17 .\" 1. Use, Modification and Redistribution (including distribution of any
18 .\" modified or derived work) in source and/or binary forms is permitted
19 .\" under this License Terms and Conditions.
21 .\" 2. Redistribution of source code must retain the copyright notices as they
22 .\" appear in each source code file, this License Terms and Conditions.
24 .\" 3. Redistribution in binary form must reproduce the Copyright Notice,
25 .\" this License Terms and Conditions, in the documentation and/or other
26 .\" materials provided with the distribution. For the purposes of binary
27 .\" distribution the "Copyright Notice" refers to the following language:
28 .\" "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
30 .\" 4. The name of JPNIC may not be used to endorse or promote products
31 .\" derived from this Software without specific prior written approval of
34 .\" 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
35 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
37 .\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
38 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
39 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
40 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
41 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
42 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
43 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
44 .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
46 .TH RUNIDN 1 "April 6, 2001"
49 runidn \- A script to allow applications to use internationalized domain names.
52 \fBrunidn\fP [\fB-e\fP \fIlocal-codeset\fP] \fIprogram-name\fP [\fIargs..\fP]
55 \fBrunidn\fP enables applications to use internationalized domain names
56 without recompilation.
57 Just add ``runidn'' before the application-name, and the application
58 can handle non-ASCII domain names. For example, you can do:
62 \f(CW% runidn telnet \fInon-ASCII-hostname\fR
66 Before using runidn, you should set up properties related to
67 internationalized DNS by configuring idnkit's configuration file
69 See idn.conf(5) which describes the configuration.
72 The following option is available:
74 \fB\-e\fP \fIlocal-codeset\fP
75 Specify the application's local codeset.
76 If the option is not specified, \fBrunidn\fR guesses the codeset
77 from the current locale.
78 See the ``NOTE'' section for more details about local codeset.
81 \fBrunidn\fR is a small shell script that sets up an environment variable
82 called ``LD_PRELOAD'', so that an application dynamically links a shared
83 library ``libidnkitres'' before any other shared libraries.
85 The library ``libidnkitres'' provides a special version of resolver
86 functions which implement features for handling internationalized
88 \fBrunidn\fR replaces the following functions with the special version:
109 By overriding them in the standard libraries with the special version
110 provided by ``libidnkitres'',
111 \fBrunidn\fR enables applications to use internationalized domain names.
114 These API functions accept non-ASCII domain names encoded
115 in the local codeset that the application is using.
116 Also the result from these APIs may contain non-ASCII domain names.
118 The normalization and codeset conversion between application's local
119 codeset and the codeset used in DNS protocol data are handled
120 automatically, so users/applications need not worry about them.
123 Properties of internationalized DNS (such as the normalization or
124 the codeset used on DNS protocol data) can be configured with the
125 idnkit's configuration file (\fBidn.conf\fR).
126 See idn.conf(5) for details.
129 Unless \fB\-e\fP option is specified, \fBrunidn\fR tries to guess
130 the application's local codeset from the application's current locale.
131 However, sometimes it cannot guess the codeset correctly, for example
132 if the application does not set the locale appropriately by calling
134 In that case, you can explicitly specify the local codeset by setting an
135 environment variable ``IDN_LOCAL_CODESET''.
136 See the section ``LOCAL CODESET'' in idn.conf(5) for details.
138 The idea of using ``LD_PRELOAD'' to replace some functions in the standard
139 library was taken from ``runsocks'' script distributed as part of SOCKS5
140 reference implementation.
142 There are many cases where \fBrunidn\fR does not work.
144 Your system must support ``LD_PRELOAD'' mechanism in the first place.
146 Due to security reasons, ``LD_PRELOAD'' mechanism is disabled for
147 setuid programs in any sane systems.
148 So \fBrunidn\fR does not work for setuid programs such as ping or rsh.
150 If your application uses a function other than the ones runidn supports for
151 name resolution, you lose.
153 idn.conf(5), runsocks(1)