2008-06-19 16:07:03 -04:00
|
|
|
/* Internationalization related declarations.
|
2010-05-08 15:56:15 -04:00
|
|
|
Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
|
2008-06-19 16:07:03 -04:00
|
|
|
|
|
|
|
This file is part of GNU Wget.
|
|
|
|
|
|
|
|
GNU Wget is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
GNU Wget is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Wget. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
Additional permission under GNU GPL version 3 section 7
|
|
|
|
|
|
|
|
If you modify this program, or any covered work, by linking or
|
|
|
|
combining it with the OpenSSL project's OpenSSL library (or a
|
|
|
|
modified version of that library), containing parts covered by the
|
|
|
|
terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
|
|
|
|
grants you additional permission to convey the resulting work.
|
|
|
|
Corresponding Source for a non-source form of such a combination
|
|
|
|
shall include the source code for the parts of OpenSSL used as well
|
|
|
|
as that of the covered work. */
|
|
|
|
|
|
|
|
#ifndef IRI_H
|
|
|
|
#define IRI_H
|
|
|
|
|
2008-07-23 18:56:29 -04:00
|
|
|
struct iri {
|
2008-08-03 16:30:12 -04:00
|
|
|
char *uri_encoding; /* Encoding of the uri to fetch */
|
2008-07-23 18:56:29 -04:00
|
|
|
char *content_encoding; /* Encoding of links inside the fetched file */
|
2008-09-27 05:13:21 -04:00
|
|
|
char *orig_url; /* */
|
2008-08-03 16:30:12 -04:00
|
|
|
bool utf8_encode; /* Will/Is the current url encoded in utf8 */
|
2008-07-23 18:56:29 -04:00
|
|
|
};
|
|
|
|
|
2008-06-19 16:07:03 -04:00
|
|
|
#ifdef ENABLE_IRI
|
|
|
|
|
|
|
|
char *parse_charset (char *str);
|
2008-06-19 17:10:06 -04:00
|
|
|
char *find_locale (void);
|
2008-06-19 18:33:02 -04:00
|
|
|
bool check_encoding_name (char *encoding);
|
2008-06-26 11:59:07 -04:00
|
|
|
const char *locale_to_utf8 (const char *str);
|
2008-07-23 18:56:29 -04:00
|
|
|
char *idn_encode (struct iri *i, char *host);
|
2008-07-02 10:37:28 -04:00
|
|
|
char *idn_decode (char *host);
|
2008-07-23 18:56:29 -04:00
|
|
|
bool remote_to_utf8 (struct iri *i, const char *str, const char **new);
|
|
|
|
struct iri *iri_new (void);
|
2009-06-29 04:07:12 -04:00
|
|
|
struct iri *iri_dup (const struct iri *);
|
2008-07-23 18:56:29 -04:00
|
|
|
void iri_free (struct iri *i);
|
2008-07-30 04:15:55 -04:00
|
|
|
void set_uri_encoding (struct iri *i, char *charset, bool force);
|
2008-07-23 18:56:29 -04:00
|
|
|
void set_content_encoding (struct iri *i, char *charset);
|
2008-06-19 16:07:03 -04:00
|
|
|
|
|
|
|
#else /* ENABLE_IRI */
|
|
|
|
|
2010-05-24 06:12:41 -04:00
|
|
|
static struct iri dummy_iri;
|
2008-07-23 18:56:29 -04:00
|
|
|
|
2008-06-26 11:59:07 -04:00
|
|
|
#define parse_charset(str) NULL
|
|
|
|
#define find_locale() NULL
|
|
|
|
#define check_encoding_name(str) false
|
|
|
|
#define locale_to_utf8(str) (str)
|
2008-07-24 08:34:48 -04:00
|
|
|
#define idn_encode(a,b) NULL
|
2008-07-02 10:37:28 -04:00
|
|
|
#define idn_decode(str) NULL
|
2008-07-23 18:56:29 -04:00
|
|
|
#define remote_to_utf8(a,b,c) false
|
|
|
|
#define iri_new() (&dummy_iri)
|
2009-07-04 01:36:14 -04:00
|
|
|
#define iri_dup(a) (&dummy_iri)
|
2008-07-23 18:56:29 -04:00
|
|
|
#define iri_free(a)
|
2008-07-30 04:15:55 -04:00
|
|
|
#define set_uri_encoding(a,b,c)
|
2008-07-23 18:56:29 -04:00
|
|
|
#define set_content_encoding(a,b)
|
2008-06-19 16:07:03 -04:00
|
|
|
|
|
|
|
#endif /* ENABLE_IRI */
|
|
|
|
#endif /* IRI_H */
|