Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2462)

Unified Diff: base/i18n/icu_encoding_detection.h

Issue 4967001: FTP: improve character encoding detection in cases where ICU's first guess is wrong. (Closed)
Patch Set: now with tests Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/i18n/icu_encoding_detection.cc » ('j') | base/i18n/icu_encoding_detection.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/icu_encoding_detection.h
diff --git a/base/i18n/icu_encoding_detection.h b/base/i18n/icu_encoding_detection.h
index e7e62536ac332e60744341524e939804bbc94dc6..cdc4cb7ba31026a7292400fb460d699b522c974d 100644
--- a/base/i18n/icu_encoding_detection.h
+++ b/base/i18n/icu_encoding_detection.h
@@ -7,6 +7,7 @@
#pragma once
#include <string>
+#include <vector>
namespace base {
@@ -15,6 +16,11 @@ namespace base {
// Returns true on success.
bool DetectEncoding(const std::string& text, std::string* encoding);
+// Detect all possible encodings of |text| and put their names
+// (as returned by ICU) in |encodings|. Returns true on success.
+bool DetectAllEncodings(const std::string& text,
+ std::vector<std::string>* encodings);
+
} // namespace base
#endif // BASE_I18N_ICU_ENCODING_DETECTION_H_
« no previous file with comments | « no previous file | base/i18n/icu_encoding_detection.cc » ('j') | base/i18n/icu_encoding_detection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698