Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java =================================================================== diff -u -r1c995cd6d87591d824ddde103a6138f2632e8f71 -r1ed31293ec907243ad2e5796dabbd842356f25ab --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 1c995cd6d87591d824ddde103a6138f2632e8f71) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 1ed31293ec907243ad2e5796dabbd842356f25ab) @@ -258,6 +258,7 @@ try { // create an empty excel file HSSFWorkbook wb = new HSSFWorkbook(); + HSSFSheet sheet = wb.createSheet("Marks"); sheet.setColumnWidth((short) 0, (short) 5000); HSSFRow row = null; @@ -278,26 +279,31 @@ first = false; row = sheet.createRow(0); cell = row.createCell((short) idx); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue("Subject"); sheet.setColumnWidth((short) idx, (short) 8000); ++idx; cell = row.createCell((short) idx); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue("Author"); sheet.setColumnWidth((short) idx, (short) 8000); ++idx; cell = row.createCell((short) idx); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue("Date"); sheet.setColumnWidth((short) idx, (short) 8000); ++idx; cell = row.createCell((short) idx); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue("Marks"); sheet.setColumnWidth((short) idx, (short) 8000); ++idx; cell = row.createCell((short) idx); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue("Comments"); sheet.setColumnWidth((short) idx, (short) 8000); ++idx; @@ -306,16 +312,20 @@ idx = 0; row = sheet.createRow(fileCount); cell = row.createCell((short) idx++); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(dto.getMessage().getSubject()); cell = row.createCell((short) idx++); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(dto.getAuthor()); cell = row.createCell((short) idx++); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(DateFormat.getInstance().format( dto.getMessage().getCreated())); cell = row.createCell((short) idx++); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); if (dto.getMessage() != null && dto.getMessage().getReport() != null @@ -326,6 +336,7 @@ cell.setCellValue(""); cell = row.createCell((short) idx++); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); if (dto.getMessage() != null && dto.getMessage().getReport() != null) cell.setCellValue(dto.getMessage().getReport() Index: lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/MonitoringAction.java =================================================================== diff -u -r22a3b9201e28162af32878adf81d41d2595eceed -r1ed31293ec907243ad2e5796dabbd842356f25ab --- lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 22a3b9201e28162af32878adf81d41d2595eceed) +++ lams_tool_survey/src/java/org/lamsfoundation/lams/tool/survey/web/action/MonitoringAction.java (.../MonitoringAction.java) (revision 1ed31293ec907243ad2e5796dabbd842356f25ab) @@ -268,11 +268,13 @@ //survey title row = sheet.createRow(idx++); cell = row.createCell((short) 0); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(survey.getTitle()); //survey instruction row = sheet.createRow(idx++); cell = row.createCell((short) 0); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(survey.getInstructions()); //display 2 empty row @@ -286,8 +288,10 @@ //display session name row = sheet.createRow(idx++); cell = row.createCell((short) 0); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(resource.getMessage(MSG_LABEL_SESSION_NAME)); cell = row.createCell((short) 1); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(session.getSessionName()); //begin to display question and its answers @@ -306,8 +310,10 @@ //display question content row = sheet.createRow(idx++); cell = row.createCell((short) 0); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(resource.getMessage(MSG_LABEL_QUESTION) + " " + questionIdx); cell = row.createCell((short) 1); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(question.getDescription()); @@ -316,6 +322,7 @@ row = sheet.createRow(idx++); cell = row.createCell((short) 0); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(resource.getMessage(MSG_LABEL_POSSIBLE_ANSWERS)); int optionIdx = 0; @@ -325,6 +332,7 @@ cell = row.createCell((short) 0); cell.setCellValue(SurveyConstants.OPTION_SHORT_HEADER + optionIdx); cell = row.createCell((short) 1); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(option.getDescription()); } if(question.isAppendText() || question.getType() == SurveyConstants.QUESTION_TYPE_TEXT_ENTRY){ @@ -333,6 +341,7 @@ cell = row.createCell((short) 0); cell.setCellValue(SurveyConstants.OPTION_SHORT_HEADER + optionIdx); cell = row.createCell((short) 1); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(resource.getMessage(MSG_LABEL_OPEN_RESPONSE)); } @@ -349,6 +358,7 @@ int cellIdx = 0; row = sheet.createRow(idx++); cell = row.createCell((short) cellIdx); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); cell.setCellValue(resource.getMessage(MSG_LABEL_LEARNER)); //increase one more option number if there are open entry option int optionsNum = options.size(); @@ -382,6 +392,7 @@ //for textEntry option if(question.isAppendText() || question.getType() == SurveyConstants.QUESTION_TYPE_TEXT_ENTRY){ cell = row.createCell((short) ++cellIdx); + cell.setEncoding(HSSFCell.ENCODING_UTF_16); if(answer.getAnswer() != null){ cell.setCellValue(answer.getAnswer().getAnswerText()); }