From bccf73d6eda38c2db257611c632e96d11d0d78aa Mon Sep 17 00:00:00 2001 From: Kartik Kathuria Date: Sat, 2 Mar 2019 00:22:20 +0530 Subject: [PATCH] charset as windows-1252 when format is MS Excel Signed-off-by: Kartik Kathuria --- js/export.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/export.js b/js/export.js index f47d829ede..2045e3a0ef 100644 --- a/js/export.js +++ b/js/export.js @@ -307,6 +307,17 @@ AJAX.registerOnload('export.js', function () { $('#checkbox_sql_auto_increment').prop('disabled', false).parent().fadeTo('fast', 1); } }); + + // When MS Excel is selected as the Format automatically Switch to Character Set as windows-1252 + $('#plugins').change(function () { + var selected_plugin_name = $('#plugins').find('option:selected').val(); + if(selected_plugin_name == "excel"){ + $('#select_charset').val('windows-1252'); + } + else{ + $('#select_charset').val('utf-8'); + } + }); // For separate-file exports only ZIP compression is allowed $('input[type="checkbox"][name="as_separate_files"]').on('change', function () {