diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-30 16:17:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-30 16:17:40 +0100 |
| commit | 2a85e711df07e8a707cfc50667bd0a29d8a09519 (patch) | |
| tree | b89200eeda155787d91e5cc0ab8044c93b3225cb /src/stl_binary_writer.cc | |
| parent | a4114c49aeec1e24e0607814a88f0f6a2d6111f5 (diff) | |
Encode to ISO6937 on the way into STL binary.
Diffstat (limited to 'src/stl_binary_writer.cc')
| -rw-r--r-- | src/stl_binary_writer.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc index 334a5bb..f8d2263 100644 --- a/src/stl_binary_writer.cc +++ b/src/stl_binary_writer.cc @@ -19,7 +19,9 @@ #include "stl_binary_writer.h" #include "subtitle.h" +#include "iso6937.h" #include "compose.hpp" +#include <boost/locale.hpp> #include <list> #include <cmath> #include <fstream> @@ -34,6 +36,7 @@ using std::setw; using std::setfill; using std::max; using std::cout; +using boost::locale::conv::utf_to_utf; using namespace sub; static void @@ -247,7 +250,7 @@ sub::write_stl_binary ( italic = false; } - text += k->text; + text += utf16_to_iso6937 (utf_to_utf<wchar_t> (k->text)); } text += "\x8A"; |
