From 8fa723a162844face2488d6cfc9c0fcb197c821f Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 18 Sep 2014 15:24:05 +0300 Subject: [PATCH 1/2] Added UTF-8 codec to csv file. fix #14 --- src/jceData/CSV/csv_exporter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jceData/CSV/csv_exporter.cpp b/src/jceData/CSV/csv_exporter.cpp index b712ad8..e466b7e 100644 --- a/src/jceData/CSV/csv_exporter.cpp +++ b/src/jceData/CSV/csv_exporter.cpp @@ -44,7 +44,9 @@ bool CSV_Exporter::exportCalendar(calendarSchedule *calSched, CalendarDialog *ca return false; } - QTextStream out(&file); + QTextStream out(&file); //The output streem. + out.setCodec("UTF-8"); //Unicode 8 + out << CSV_CALENDAR_HEADER << "\n"; // macro in header file for (calendarCourse *coursePtr: *(calSched->getCourses())) //main loop - running though all courses From bf0c2574def05578585c2f76daea0f9ec80b6c13 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 18 Sep 2014 15:27:48 +0300 Subject: [PATCH 2/2] Cleaning after merge --- src/jceData/CSV/csv_exporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jceData/CSV/csv_exporter.cpp b/src/jceData/CSV/csv_exporter.cpp index 615094b..8bf4a3a 100644 --- a/src/jceData/CSV/csv_exporter.cpp +++ b/src/jceData/CSV/csv_exporter.cpp @@ -68,7 +68,7 @@ bool CSV_Exporter::exportCalendar(calendarSchedule *calSched, CalendarDialog *ca QString name = coursePtr->getName(); QString room = coursePtr->getRoom(); - QDate currentDate = cal->getStartDate(); // currentDate will iterate thou the semester + QDate currentDate = cal->getStartDate(); // currentDate will iterate throuh the semester currentDate = currentDate.addDays(day-1); //selecting the REAL starting day of that course