diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2012-05-06 14:23:07 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2012-05-06 14:23:07 +0000 |
commit | 06000077987fd107a3a69761f39b9a83eb1d8af0 (patch) | |
tree | 7d31d768d33955ed1cae99c79bfa5087117a4555 /src/htscharset.h | |
parent | 8368e4772fdd69ae04d95b08e042fe43eae3392c (diff) |
Missing files
Diffstat (limited to 'src/htscharset.h')
-rw-r--r-- | src/htscharset.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/htscharset.h b/src/htscharset.h new file mode 100644 index 0000000..035f05e --- /dev/null +++ b/src/htscharset.h @@ -0,0 +1,70 @@ +/* ------------------------------------------------------------ */ +/* +HTTrack Website Copier, Offline Browser for Windows and Unix +Copyright (C) Xavier Roche and other contributors + +This program 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 any later version. + +This program 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 this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +Important notes: + +- We hereby ask people using this source NOT to use it in purpose of grabbing +emails addresses, or collecting any other private information on persons. +This would disgrace our work, and spoil the many hours we spent on it. + + +Please visit our Website: http://www.httrack.com +*/ + + +/* ------------------------------------------------------------ */ +/* File: Charset conversion functions */ +/* Author: Xavier Roche */ +/* ------------------------------------------------------------ */ + +#ifndef HTS_CHARSET_DEFH +#define HTS_CHARSET_DEFH + +/** + * Convert the string "s" from charset "charset" to UTF-8. + * Return NULL upon error. + **/ +extern char *hts_convertStringToUTF8(const char *s, size_t size, const char *charset); + +/** + * Extract the charset from the HTML buffer "html" + **/ +extern char* hts_getCharsetFromMeta(const char *html, size_t size); + +#ifdef _WIN32 + +/** + * Convert UTF-8 to WCHAR. + **/ +extern LPWSTR hts_convertUTF8StringToUCS2(const char *s, int size, int* pwsize); + +/** + * Convert from WCHAR. + **/ +extern char *hts_convertUCS2StringToUTF8(LPWSTR woutput, int wsize); + +/** + * Convert current system codepage to UTF-8. + **/ +extern char *hts_convertStringSystemToUTF8(const char *s, size_t size); + +#endif + +#endif |