summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a97d98)
raw | patch | inline | side by side (parent: 7a97d98)
author | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Mon, 14 Nov 2011 10:06:58 +0000 (10:06 +0000) | ||
committer | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Mon, 14 Nov 2011 10:06:58 +0000 (10:06 +0000) |
odcread.cc | patch | blob | history |
diff --git a/odcread.cc b/odcread.cc
index caa87e7713f0dc937cd24c717c54dbbc2add4160..fc210a8a10c59f5cc0e0660a711a702114b2bc9e 100644 (file)
--- a/odcread.cc
+++ b/odcread.cc
d_context.top()->addPiece(str);
}
virtual void textLongPiece(const LongPiece *piece) {
+ /*
char *out = (char*)piece->getBuffer();
std::string str(out);
d_context.top()->addPiece(str);
+ */
//d_convLong = iconv_open(setlocale(LC_CTYPE, 0), "UCS-2");
- /*
- iconv_t conv = iconv_open("UTF-8", "UTF-8");
+ iconv_t conv = iconv_open("UTF-8", "UCS-2");
if (conv == (iconv_t)-1) {
std::string str("iconv initialization error: ");
str += strerror(errno);
throw str.c_str();
}
- size_t bytesIn = piece->size() + 1;
+ size_t bytesIn = piece->size() + 2;
char *in = (char*)piece->getBuffer();
size_t bytesOut = bytesIn; // FIXME probably not safe.
char *out = new char[bytesIn];
for (std::string::iterator it = str.begin(); it < str.end(); ++it) {
if (*it == '\r') *it = '\n';
}
- d_context.top()->addPiece(str);*/
+ d_context.top()->addPiece(str);
}
};