]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/parsers/chg_service.cpp
Implemented encoding for all parsers.
[stg.git] / stglibs / srvconf.lib / parsers / chg_service.cpp
index f8627614c0327bf7e9eb34f96e28e8c39b5f8c53..eabe11df43f231af0f92df5511859481a266c1d0 100644 (file)
 
 using namespace STG;
 
-std::string CHG_SERVICE::Serialize(const SERVICE_CONF_RES & conf)
+std::string CHG_SERVICE::Serialize(const SERVICE_CONF_RES & conf, const std::string & encoding)
 {
 std::ostringstream stream;
 
 appendResetable(stream, "name", conf.name);
-appendResetable(stream, "comment", conf.comment);
+appendResetable(stream, "comment", MaybeIconv(conf.comment, "koi8-ru", encoding));
 appendResetable(stream, "cost", conf.cost);
 appendResetable(stream, "payDay", conf.payDay);