Commit 9ee1afd4 authored by Sergey.Konovalov's avatar Sergey.Konovalov

проблема с кодировкой при скачивании отчетов teamalab

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65302 954022d7-b5bf-4e40-9824-e11837661b57
parent 52d75bc7
......@@ -682,6 +682,7 @@ var c_oAscEncodings = [
[ 50, 12000, "UTF-32", "Unicode (UTF-32)" ],
[ 51, 12001, "UTF-32BE", "Unicode (UTF-32 Big Endian)" ]
];
var c_oAscEncodingsMap = {"437": 43, "720": 1, "737": 21, "775": 5, "850": 39, "852": 15, "855": 12, "857": 35, "858": 40, "860": 41, "861": 30, "862": 25, "863": 42, "865": 31, "866": 13, "869": 22, "874": 32, "932": 27, "936": 18, "949": 28, "950": 17, "1200": 48, "1201": 49, "1250": 16, "1251": 14, "1252": 44, "1253": 23, "1254": 36, "1255": 26, "1256": 2, "1257": 6, "1258": 45, "10007": 11, "12000": 50, "12001": 51, "20866": 9, "21866": 10, "28591": 37, "28592": 19, "28593": 33, "28594": 3, "28595": 8, "28596": 0, "28597": 20, "28598": 24, "28599": 34, "28603": 4, "28604": 7, "28605": 38, "51949": 29, "65000": 47, "65001": 46}
var c_oAscCodePageUtf8 = 46;//65001
var c_oAscMaxTooltipLength = 256;
......
......@@ -1584,7 +1584,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
case "needparams":
// Проверяем, возможно нам пришли опции для CSV
if (t.documentOpenOptions) {
var codePageCsv = t.documentOpenOptions["codePage"],
var codePageCsv = c_oAscEncodingsMap[t.documentOpenOptions["codePage"]] || c_oAscCodePageUtf8,
delimiterCsv = t.documentOpenOptions["delimiter"];
if (null !== codePageCsv && undefined !== codePageCsv && null !== delimiterCsv && undefined !== delimiterCsv) {
t.asc_setAdvancedOptions(c_oAscAdvancedOptionsID.CSV, new asc.asc_CCSVAdvancedOptions(codePageCsv, delimiterCsv));
......
......@@ -6746,8 +6746,8 @@ function _downloadAs(editor, command, oDocumentMailMerge, oMailMergeSendData, tx
oAdditionalData['url'] = editor.mailMergeFileData['url'];
oAdditionalData['format'] = editor.mailMergeFileData['fileType'];
// ToDo select csv params
oAdditionalData['codepage'] = 65001;
oAdditionalData['delimiter'] = 4; // c_oAscCsvDelimiter.Comma
oAdditionalData['codepage'] = c_oAscCodePageUtf8;
oAdditionalData['delimiter'] = c_oAscCsvDelimiter.Comma
} else if (c_oAscFileType.TXT === filetype && !txtOptions && null == oDocumentMailMerge && null == oMailMergeSendData) {
// Мы открывали команду, надо ее закрыть.
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.DownloadAs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment