Download it now!
Bug 107882 - Basic editor cracking Cyrillic symbols in BASIC script when edited (xls)
Summary: Basic editor cracking Cyrillic symbols in BASIC script when edited (xls)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.1.6.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: dataLoss
Depends on:
Blocks: Macro-VBA Macro-StarBasic
  Show dependency treegraph
 
Reported: 2017-05-15 22:58 UTC by dimahetman
Modified: 2020-10-06 19:02 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
file w cracked symbols (39.00 KB, application/vnd.ms-excel)
2017-05-15 22:58 UTC, dimahetman
Details
Cracked cyrillic symbol in Basic editor after save file in xls format (31.00 KB, application/vnd.ms-excel)
2017-09-25 07:30 UTC, Michelin38
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dimahetman 2017-05-15 22:58:14 UTC
Created attachment 133343 [details]
file w cracked symbols

I try to change BASIC script in  XLS file (created in original MS app. system Cyrillic encoding is cp1251,  excel 97-2003 format) after that. I saved it, closed and open it again BUT all Cyrillic symbols was cracked (only ??????? symbols) like
>>
 Nums1 = Array("", "один ", "два ", "три ", "четыре ", "пять ", "шесть ", "семь ", "восемь ", "девять ")
>>
to
>>
 Nums1 = Array("", "???? ", "??? ", "??? ", "?????? ", "???? ", "????? ", "???? ", "?????? ", "?????? ")
>>
or like in attched file.

I understand that Cyrillic in functions is not good but in arrays and variables?
Comment 1 Julien Nabet 2017-05-16 08:27:01 UTC
5.1 branch is EOL and 5.2 will be soon.

Could you give a try to last stable LO version 5.3.3?
Comment 2 dimahetman 2017-05-16 21:59:29 UTC
at the same in:
version: 5.3.3.2
Зборка: 1:5.3.3~rc2-0ubuntu0.16.04.1~lo0
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; VCL: gtk2; Layout Engine: new; 
Locale: be-BY (be_BY.UTF-8); Calc: group

I try xlsm format result at the same.
Comment 3 dimahetman 2017-05-18 08:05:54 UTC
I had a similar problem more than a year ago, but then it was too lazy to make a report, in the hope of soon correct. Today if to paraphrase the saying 
"on other people hope, but itself good be can't stop." When you try to open the corrupted file again in the Excel, the "?" Signs are also displayed in the VBA editor.

Presumably, something with codepages: in my country in Windows is usually used cp1251. In ubuntu I have a system encoding UTF-8

Downloaded the sources, but did not yet understand where to look for the problem.
Comment 4 Xisco Faulí 2017-06-08 09:35:27 UTC
This bug was incorrectly moved from NEEDINFO to REOPENED. Putting back to UNCONFIRMED.
Comment 5 Julien Nabet 2017-06-09 07:18:39 UTC
Could you attach the original xls file?
Indeed Excel 2013 tries to retrieve some information but doesn't succeed completely.
Comment 6 Michelin38 2017-09-08 06:38:50 UTC
I also have same problem with *.xls and *.xlsm files
Comment 7 raal 2017-09-22 16:17:00 UTC
Hello,

Thank you for filing the bug. Please send us a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO', so please do change it back to 'UNCONFIRMED' once you have attached a document.
(Please note that the attachment will be public, remove any sensitive information before attaching it.)
How can I eliminate confidential data from a sample document?
https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F
Thank you
Comment 8 Michelin38 2017-09-25 07:30:40 UTC
Created attachment 136521 [details]
Cracked cyrillic symbol in Basic editor after save file in xls format
Comment 9 Julien Nabet 2017-09-25 07:33:57 UTC
As indicated next to the field, the version must correspond to the earliest affected so I reverted back to 5.1.6.2
Comment 10 Julien Nabet 2017-09-25 21:12:45 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this with Michelin38's file.
Comment 11 dimahetman 2017-09-30 17:04:56 UTC
(In reply to Michelin38 from comment #8)
> Created attachment 136521 [details]
> Cracked cyrillic symbol in Basic editor after save file in xls format

I download Michelin38's file, opened it and saw this in the doc:

MsgBox "Hello! This greeting in English"
MsgBox "Привет!This greeting in Russian"


and save after that I saved it and opened again and saw this:

MsgBox "Hello! This greeting in English"
MsgBox "??????!This greeting in Russian"

Version: 5.1.6.2
Build ID: 1:5.1.6~rc2-0ubuntu1~xenial2
Comment 12 Julien Nabet 2017-09-30 18:44:40 UTC
 dimahetman: why did you put UNCONFIRMED status since you confirmed it and I had confirmed it too?
Anyway, let's put this back to NEW.
Comment 13 Kirill 2018-08-29 06:58:38 UTC
The same problem with LibreOffice 6.1.0.3 under windows 8.1 Pro. After saving file in .xlsm format with Cyrillic letters in script all of them turns into ????????. Script becomes unusable.
Comment 15 himajin100000 2019-09-01 19:01:17 UTC
Seems I'm misunderstanding something. SAL_INFO I put with confidence was not reached.
Comment 16 himajin100000 2019-09-01 21:58:19 UTC
here is another suggestion for source code pointer:

https://opengrok.libreoffice.org/xref/core/oox/source/ole/vbaproject.cxx?r=b3edf85e#266
Comment 19 himajin100000 2019-09-05 21:46:32 UTC
I guess Markus has a good knowledge, considering these paths in the code.

https://opengrok.libreoffice.org/xref/core/oox/source/ole/vbaexport.cxx?r=ed5e4405#1073
Comment 20 Mike Kaganski 2020-10-06 19:02:18 UTC
This is very likely a dupe of bug 75263, which is in See Also.