From 3d4eb53e5e462e4a00afaf5eaef05c0175b3ac7f Mon Sep 17 00:00:00 2001 From: randomdan Date: Wed, 16 Feb 2011 16:09:32 +0000 Subject: Make CurlHandle throw an exception on failure Improve error messages almost everywhere Allow setting of platform through the options system Allow specifying query params on the console Fix file stream writer's string support for strings containing multibyte chars --- project2/fileStrmVarWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'project2/fileStrmVarWriter.cpp') diff --git a/project2/fileStrmVarWriter.cpp b/project2/fileStrmVarWriter.cpp index f3812ce..8b5b2ec 100644 --- a/project2/fileStrmVarWriter.cpp +++ b/project2/fileStrmVarWriter.cpp @@ -46,10 +46,10 @@ void FileStreamVariableWriter::operator()(const double & i) const { fprintf(out, "%g", i); } void FileStreamVariableWriter::operator()(const Glib::ustring & i) const { - fprintf(out, "'%.*s'", i.length(), i.c_str()); + fprintf(out, "'%.*s'", i.bytes(), i.c_str()); } void FileStreamVariableWriter::operator()(const boost::shared_ptr & i) const { - fprintf(out, "'%.*s'", i->length(), i->c_str()); + fprintf(out, "'%.*s'", i->bytes(), i->c_str()); } void FileStreamVariableWriter::operator()(const boost::posix_time::ptime & i) const { fprintf(out, "[%s]", boost::posix_time::to_iso_extended_string(i).c_str()); -- cgit v1.2.3