2021-04-06 23:10:57 +08:00
|
|
|
#ifndef UTILS_H
|
|
|
|
#define UTILS_H
|
|
|
|
|
|
|
|
class QByteArray;
|
|
|
|
class QString;
|
|
|
|
|
2021-04-08 10:29:21 +08:00
|
|
|
#define ENCODING_AUTO_DETECT "AUTO"
|
|
|
|
#define ENCODING_UTF8 "UTF-8"
|
|
|
|
#define ENCODING_UTF8_BOM "UTF-8 BOM"
|
|
|
|
#define ENCODING_SYSTEM_DEFAULT "SYSTEM"
|
|
|
|
#define ENCODING_ASCII "ASCII"
|
2021-04-06 23:10:57 +08:00
|
|
|
|
2021-04-08 10:29:21 +08:00
|
|
|
|
|
|
|
const QByteArray GetFileEncodingType(const QByteArray& content);
|
2021-04-06 23:10:57 +08:00
|
|
|
|
2021-04-07 21:13:15 +08:00
|
|
|
bool isTextAllAscii(const QString& text);
|
2021-04-06 23:10:57 +08:00
|
|
|
|
|
|
|
#endif // UTILS_H
|