X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=transcode.cpp;fp=transcode.cpp;h=0000000000000000000000000000000000000000;hp=3f4121da9add1ae58ac472aeae78bde78542e0fe;hb=628d762fbfd512aedde6f313f66594291dad4eb1;hpb=e240e074ce15c17d644e378067c2941aefcd5611 diff --git a/transcode.cpp b/transcode.cpp deleted file mode 100644 index 3f4121d..0000000 --- a/transcode.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -using namespace std; -using namespace Msp; - -int main(int argc, char **argv) -{ - if(argc<3) - { - cerr<<"Usage: "< \n"; - return 1; - } - - StringCodec::Codec *from = StringCodec::create_codec(argv[1]); - StringCodec::Codec *to = StringCodec::create_codec(argv[2]); - - StringCodec::Decoder *from_dec = from->create_decoder(); - StringCodec::Encoder *to_enc = to->create_encoder(); - - string line; - while(getline(cin, line)) - { - line += '\n'; - StringCodec::ustring ustr; - from_dec->decode(line, ustr); - string result; - to_enc->encode(ustr, result); - cout<sync(result); - cout<