encoding.h
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
#ifndef CPPCMS_ENCODING_H
#define CPPCMS_ENCODING_H
#include <string>
#include <map>
#include <locale>
#include <cppcms/defs.h>
#include <cppcms/config.h>
namespace cppcms {
namespace encoding {
bool CPPCMS_API valid(std::locale const &loc,char const *begin,char const *end,size_t &count);
bool CPPCMS_API valid_utf8(char const *begin,char const *end,size_t &count);
bool CPPCMS_API valid(char const *encoding,char const *begin,char const *end,size_t &count);
bool CPPCMS_API valid(std::string const &encoding,char const *begin,char const *end,size_t &count);
bool CPPCMS_API is_ascii_compatible(std::string const &encoding);
bool CPPCMS_API validate_or_filter( std::string const &encoding,
char const *begin,char const *end,
std::string &output,
char replace = 0);
std::string CPPCMS_API to_utf8(std::locale const &loc,char const *begin,char const *end);
std::string CPPCMS_API to_utf8(char const *encoding,char const *begin,char const *end);
std::string CPPCMS_API to_utf8(std::locale const &loc,std::string const &str);
std::string CPPCMS_API to_utf8(char const *encoding,std::string const &str);
std::string CPPCMS_API from_utf8(std::locale const &loc,char const *begin,char const *end);
std::string CPPCMS_API from_utf8(char const *encoding,char const *begin,char const *end);
std::string CPPCMS_API from_utf8(std::locale const &loc,std::string const &str);
std::string CPPCMS_API from_utf8(char const *encoding,std::string const &str);
} // encoding
} // cppcms
#endif
cppcms::encoding::from_utf8
std::string CPPCMS_API from_utf8(std::locale const &loc, char const *begin, char const *end)
cppcms::encoding::validate_or_filter
bool CPPCMS_API validate_or_filter(std::string const &encoding, char const *begin, char const *end, std::string &output, char replace=0)
cppcms::encoding::valid
bool CPPCMS_API valid(std::locale const &loc, char const *begin, char const *end, size_t &count)
cppcms::encoding::is_ascii_compatible
bool CPPCMS_API is_ascii_compatible(std::string const &encoding)
cppcms::encoding::valid_utf8
bool CPPCMS_API valid_utf8(char const *begin, char const *end, size_t &count)
cppcms::encoding::to_utf8
std::string CPPCMS_API to_utf8(std::locale const &loc, char const *begin, char const *end)