[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupt
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice |
Date: |
Thu, 8 Jun 2017 13:05:15 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #14, bug #51203 (project octave):
Andrey,
Working with encodings is a mess. Especially on Windows.
To make your live easier, I would always use UTF-8 with Octave. To change your
default encoding in the editor, please open your preferences (menu "Edit" ->
"Preferences"). On the very bottom on the "Editor" tab, select "UTF-8" from
the drop-down list.
Now close all open tabs in the editor. When you open your m-files again, you
might notice that your Cyrillic characters look messed up. You can either
convert your m-files to UTF-8 (e.g. with Notepad++) or correct the messed up
characters manually.
With these settings, the following example works for me:
cell1={'Анализ : ddmmyyyy_hhmmss'};
cell1(end+1,1)={1};
cell1(end,2)={2};
cell1(end,3)={3};
cell1(end+1,1)={'name'};
cell1(end,2)={'min'};
cell1(end,3)={'max'};
xls = xlsopen ("o076xls_utf8.xlsx", 1, "oct");
xls = oct2xls (cell1, xls, 1, "");
xls = xlsclose (xls);
xlswrite ("o0776xlswrite.xlsx", cell1);
Do not use the "convert_utf" setting in this case. Your input is already UTF-8
encoded.
Philip,
The dirty hack that we used to solve bug #49222 only works for encodings which
match Unicode in the 128-255 area. That means it only works for "Latin-1" (or
to some extend "ANSI") encoding. I did not realize this at the time (sorry).
The current dev builds include "native2unicode" and "unicode2native". If you
like, we could work on integrating these functions to make the io package work
with all supported encodings when Octave 4.4 comes out.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51203>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, (continued)
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Philip Nienhuis, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Aleshin Andrey Igorevich, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice,
Markus Mützel <=
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Philip Nienhuis, 2017/06/08
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Andrey Aleshin Igorevich, 2017/06/09
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Andrey Aleshin Igorevich, 2017/06/09
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Philip Nienhuis, 2017/06/09
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Andrey Aleshin Igorevich, 2017/06/09
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output in a corrupted .xlsx. 'oct' output Russian in a non-readable xlsx. 'oct' need to execute twice, Markus Mützel, 2017/06/09
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output results in a corrupted .xlsx / unicode issues, Philip Nienhuis, 2017/06/11
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output results in a corrupted .xlsx / unicode issues, Andrey Aleshin Igorevich, 2017/06/13
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output results in a corrupted .xlsx / unicode issues, Markus Mützel, 2017/06/13
- [Octave-bug-tracker] [bug #51203] xlswrite(...'com') output results in a corrupted .xlsx / unicode issues, Andrey Aleshin Igorevich, 2017/06/13