[bug] Fix bug 44259 (#128)

Set default 'codepage' and 'delimiter' in ConvertService.ashx while 'region' param is not used.
This commit is contained in:
Sergey Konovalov
2020-01-22 18:16:10 +03:00
committed by Alexey Golubev
parent f66fbbbc49
commit 02daec914e

View File

@ -203,12 +203,8 @@ function convertRequest(req, res, isJson) {
cmd.setOutputFormat(outputFormat);
let outputExt = formatChecker.getStringFromFormat(cmd.getOutputFormat());
var fileTo = constants.OUTPUT_NAME + '.' + outputExt;
if (undefined != params.codePage) {
cmd.setCodepage(commonDefines.c_oAscEncodingsMap[params.codePage]);
}
if (undefined != params.delimiter) {
cmd.setCodepage(parseIntParam(params.delimiter));
}
cmd.setCodepage(commonDefines.c_oAscEncodingsMap[params.codePage] || commonDefines.c_oAscCodePageUtf8);
cmd.setDelimiter(parseIntParam(params.delimiter) || commonDefines.c_oAscCsvDelimiter.Comma);
if(undefined != params.delimiterChar)
cmd.setDelimiterChar(params.delimiterChar);
if (params.region && locale[params.region.toLowerCase()]) {