Removed dependency from universal charset detector (that was the last one)

Originally committed to SVN as r1662.
This commit is contained in:
Rodrigo Braz Monteiro 2008-01-01 22:42:29 +00:00
parent 75b4fb1437
commit 3f4349584f
2 changed files with 11 additions and 6 deletions

View File

@ -40,10 +40,10 @@
#include <algorithm> #include <algorithm>
#include <string> #include <string>
#include "text_file_reader.h" #include "text_file_reader.h"
#include "config.h"
#ifdef __WINDOWS__ #ifdef __WINDOWS__
#ifndef NO_AUTODETECT_CHARSET #ifdef WITH_UNIVCHARDET
#define AUTODETECT_CHARSET
#include "charset_detect.h" #include "charset_detect.h"
#endif #endif
#endif #endif
@ -143,7 +143,7 @@ wxString TextFileReader::GetEncoding(const wxString _filename) {
if (b[i] < 9 || (b[i] > 13 && b[i] < 32)) return _T("binary"); if (b[i] < 9 || (b[i] > 13 && b[i] < 32)) return _T("binary");
} }
#ifdef AUTODETECT_CHARSET #ifdef WITH_UNIVCHARDET
// Use universalchardet library to detect charset // Use universalchardet library to detect charset
CharSetDetect det; CharSetDetect det;
return det.GetEncoding(_filename); return det.GetEncoding(_filename);

View File

@ -38,12 +38,12 @@
// Enable Automation // Enable Automation
// Requires: Lua // Requires: Lua (in repository)
//#define WITH_AUTOMATION //#define WITH_AUTOMATION
// Enable Automation 3 // Enable Automation 3
// Requires: auto3 dll, Lua // Requires: auto3 dll (in repository), Lua (in repository)
//#define WITH_AUTO3 //#define WITH_AUTO3
@ -90,3 +90,8 @@
// Enable libass // Enable libass
// Requires: libass // Requires: libass
//#define WITH_LIBASS //#define WITH_LIBASS
// Enable universal charset detector
// Requires: universalcharset (in repository)
//#define WITH_UNIVCHARDET