acl/app/iconv/charset.h

32 lines
664 B
C
Raw Normal View History

2018-12-12 11:16:12 +08:00
#pragma once
class charset_radar
{
public:
charset_radar(void);
~charset_radar(void);
/**
*
* @param data
* @param len
* @param charset_result
* @return {bool}
*/
bool detact(const char *data, int len, acl::string &charset_result);
bool detact(const acl::string &data, acl::string &charset_result);
/*
*
*/
void setDebugMode(bool flag)
{
debug_mode_ = flag;
}
private:
bool debug_mode_;
};
//bool format_utf8(const char *str, int len, acl::string &out);