\r
#include "../StdAfx.h"\r
\r
+#pragma warning (disable: 4244)\r
+\r
#include "CIIProtocolStrategy.h"\r
#include "CIICommandsImpl.h"\r
#include <sstream>\r
#include <algorithm>\r
#include <modules/flash/producer/cg_producer.h>\r
+#include <boost/locale.hpp>\r
\r
namespace caspar { namespace protocol { namespace cii {\r
\r
pCIIStrategy_->DisplayMediaFile(filename_); \r
\r
//TODO: Need to be checked for validity\r
- else if(state_ == 1)\r
- flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->add(layer_, filename_, false, TEXT(""), xmlData_);\r
+ else if(state_ == 1) \r
+ {\r
+ // HACK fix. The data sent is UTF8, however the protocol is implemented for ISO-8859-1. Instead of doing risky changes we simply convert into proper encoding when leaving protocol code.\r
+ auto xmlData2 = boost::locale::conv::utf_to_utf<wchar_t, char>(std::string(xmlData_.begin(), xmlData_.end()));\r
+ flash::get_default_cg_producer(pCIIStrategy_->GetChannel())->add(layer_, filename_, false, TEXT(""), xmlData2);\r
+ }\r
}\r
\r
\r