localencoding.h revision 04bdb234571448ed6194e1d4048e6512f2446f1c
5cd4555ad444fd391002ae32450572054369fd42Rob Austein/* $Id: localencoding.h,v 1.7 2000/08/02 02:06:40 ishisone Exp $ */
5cd4555ad444fd391002ae32450572054369fd42Rob Austein/*
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt * Copyright (c) 2000 Japan Network Information Center. All rights reserved.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington *
81f58902eb5a1c1ab22742c72bd6cf318acbc06aTinderbox User * By using this file, you agree to the terms and conditions set forth bellow.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews *
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * LICENSE TERMS AND CONDITIONS
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater *
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * The following License Terms and Conditions apply, unless a different
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * license is obtained from Japan Network Information Center ("JPNIC"),
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * a Japanese association, Fuundo Bldg., 1-2 Kanda Ogawamachi, Chiyoda-ku,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Tokyo, Japan.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews *
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * 1. Use, Modification and Redistribution (including distribution of any
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * modified or derived work) in source and/or binary forms is permitted
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * under this License Terms and Conditions.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews *
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * 2. Redistribution of source code must retain the copyright notices as they
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * appear in each source code file, this License Terms and Conditions.
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews *
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews * 3. Redistribution in binary form must reproduce the Copyright Notice,
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * this License Terms and Conditions, in the documentation and/or other
2f5461d23b4044b62d4d668732611909d902e54dJeremy C. Reed * materials provided with the distribution. For the purposes of binary
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * distribution the "Copyright Notice" refers to the following language:
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * "Copyright (c) Japan Network Information Center. All rights reserved."
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley *
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * 4. Neither the name of JPNIC may be used to endorse or promote products
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * derived from this Software without specific prior written approval of
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * JPNIC.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley *
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
cfa2326b5c96a3a4c720262e077b2baf9fc27970Tinderbox User *
81f58902eb5a1c1ab22742c72bd6cf318acbc06aTinderbox User * 6. Indemnification by Licensee
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Any person or entities using and/or redistributing this Software under
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * this License Terms and Conditions shall defend indemnify and hold
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * harmless JPNIC from and against any and all judgements damages,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * expenses, settlement liabilities, cost and other liabilities of any
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * kind as a result of use and redistribution of this Software or any
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews * claim, suite, action, litigation or proceeding by any third party
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * arising out of or relates to this License Terms and Conditions.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein *
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * 7. Governing Law, Jurisdiction and Venue
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * This License Terms and Conditions shall be governed by and and
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * construed in accordance with the law of Japan. Any person or entities
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * using and/or redistributing this Software under this License Terms and
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews * Conditions hereby agrees and consent to the personal and exclusive
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * jurisdiction and venue of Tokyo District Court of Japan.
a769eca4e3b223866b01dc8f7a4dde8d9e49bab0Mark Andrews */
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley#ifndef MDN_LOCALENCODING_H
431859b442e89281a0d42652200a8de0668bc6b9Evan Hunt#define MDN_LOCALENCODING_H 1
b435b1ded3def3159f597953d21dffc1615cb250Brian Wellington
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley/*
9b6a170d22d61026d31bde87523f3320628b6ebcBrian Wellington * Local codeset detection.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley *
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * Determine the local codeset (the codeset used by the current application),
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * based on the locale information.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley */
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#define MDN_LOCALCS_ENV "MDN_LOCAL_CODESET"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein/*
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Get the codeset name corresponding to the current locale,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * suitable for passing to 'mdn_converter_create'.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein *
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * If the codeset cannot be determined, the locale name itself
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * will be returned in the hope that codeset alias file translates it
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley * to the right name.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein *
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt * If it cannot retrieve the current locale name, NULL will be
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt * returned.
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt */
122c58bd11790c7576cdb1c6fd8e4439d0d7f7a5Mark Andrewsextern const char *mdn_localencoding_name(void);
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt#endif /* MDN_LOCALENCODING_H */
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt