Mercurial > dedupe
comparison Apps/updateDeDupe.cpp @ 102:5906661c0421
New attempt on getting correct encodings.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Thu, 13 Feb 2014 15:20:37 +0100 |
| parents | c17475848bf4 |
| children | 27e628852401 |
comparison
equal
deleted
inserted
replaced
| 101:6c6f3a5f96ea | 102:5906661c0421 |
|---|---|
| 1 | |
| 2 | |
| 1 #include "DataController.hpp" | 3 #include "DataController.hpp" |
| 2 | 4 |
| 3 #include "Exception/Exception.hpp" | 5 #include "Exception/Exception.hpp" |
| 4 | 6 |
| 5 #include <iostream> | 7 #include <iostream> |
| 6 #include <QtCore/QList> | 8 #include <QtCore/QList> |
| 7 #include <boost/foreach.hpp> | 9 #include <boost/foreach.hpp> |
| 10 #include <boost/archive/detail/utf8_codecvt_facet.hpp> | |
| 11 #include <locale> | |
| 12 #include <boost/archive/add_facet.hpp> | |
| 13 //#include <codecvt> | |
| 8 | 14 |
| 9 int main(int argc, char *argv[]) { | 15 int main(int argc, char *argv[]) { |
| 10 | 16 |
| 11 QStringList paths; | 17 QStringList paths; |
| 12 | 18 |
| 19 /* | |
| 20 typedef wchar_t ucs4_t; | |
| 21 | |
| 22 std::locale old_locale; | |
| 23 std::locale utf8_locale(old_locale, new utf8_codecvt_facet<ucs4_t>); | |
| 24 | |
| 25 // Set a New global locale | |
| 26 //std::locale::global(utf8_locale); | |
| 27 */ | |
| 13 for (int i = 1; i < argc; ++i) { | 28 for (int i = 1; i < argc; ++i) { |
| 14 char path_buf[PATH_MAX]; | 29 char path_buf[PATH_MAX]; |
| 15 realpath(argv[i], path_buf); | 30 realpath(argv[i], path_buf); |
| 16 paths.push_back(path_buf); | 31 paths.push_back(path_buf); |
| 17 } | 32 } |
| 30 std::cerr << "Unrecoverable error: " << e.toString().toStdString(); | 45 std::cerr << "Unrecoverable error: " << e.toString().toStdString(); |
| 31 exit(1); | 46 exit(1); |
| 32 } | 47 } |
| 33 | 48 |
| 34 } | 49 } |
| 35 | |
| 36 |
