From 2a85e711df07e8a707cfc50667bd0a29d8a09519 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 30 May 2014 16:17:40 +0100 Subject: Encode to ISO6937 on the way into STL binary. --- src/stl_binary_writer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/stl_binary_writer.cc') 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 #include #include #include @@ -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 (k->text)); } text += "\x8A"; -- cgit v1.2.3