--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2006 by Kita Developers *
+ * ikemo@users.sourceforge.jp *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ ***************************************************************************/
+#include "jbbs.h"
+
+#include <QtCore/QTextCodec>
+
+#include "kita_misc.h"
+#include "postdata.h"
+
+using namespace Kita;
+
+JBBS::JBBS()
+{
+ m_readCodec = QTextCodec::codecForName("eucJP");
+}
+
+QString JBBS::buildPostStr(const PostData& data)
+{
+ QString ret;
+ int mib = m_writeCodec->mibEnum();
+
+ ret += "submit=%8f%91%82%ab%8d%9e%82%de"; /* kakikomu */
+ ret += "&NAME=" + encodeString(data.name(), mib);
+ ret += "&MAIL=" + encodeString(data.mail(), mib);
+ ret += "&MESSAGE=" + encodeString(data.body(), mib).replace(';', "%3B");
+ ret += "&BBS=" + data.boardId().section('/', 1, 1);
+ ret += "&DIR=" + data.boardId().section('/', 0, 0);
+ ret += "&KEY=" + data.threadId();
+ ret += "&TIME=" + QString::number(data.serverTime());
+
+ return ret;
+}