Bug 119096 - Error Display Chinese file
Summary: Error Display Chinese file
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.2 rc
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-05 00:18 UTC by quanzhong
Modified: 2018-08-11 15:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
the txt file to be openned (10.30 KB, text/plain)
2018-08-05 00:20 UTC, quanzhong
Details
Error Displayed file contents (74.81 KB, image/jpeg)
2018-08-05 00:22 UTC, quanzhong
Details
corrcet display of the file contents (40.94 KB, image/jpeg)
2018-08-05 00:23 UTC, quanzhong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description quanzhong 2018-08-05 00:18:43 UTC
Description:
Linux Mint version 19, running LibreOffice 6.0.6.2 or version 6.1.0.2, when open a Chinese txt file, it does not display correctly.

Steps to Reproduce:
1.just open the txt file.
2.
3.

Actual Results:
�������

����:�������

���ݼ��:
  ��ʧ����ǰ��ϯλ�����ŵ�����������ľ�����ֽ����ѹ��꣬�ݷ�֮�ʣ������صõ������������������������ҿ���԰ٹ��ŵ��Ӵ���ı��ɴ��ʧȥ�Ĺ�����Ҫ���������ҵĵ��ˣ�ʬ���ڽ��¡��������������Ϊ������Σ���֮���󣬲����������չ��ޣ�

��1�� �ٹ���

Expected Results:
神御九天

作者:网络黑侠

内容简介:
  错失宗门前三席位的外门弟子萧雾,被曾经的竞争对手接连打压两年,蛰伏之际,于阴魂池得到初代掌门遗留的破损法器,无意间揭开针对百鬼门的庞大阴谋面纱。失去的光阴,我要夺回来。辱我的敌人,尸伏于脚下。漫天神佛大能与我为敌又如何!吾之背后,才是你们最终归宿!

第1章 百鬼门


Reproducible: Always


User Profile Reset: Yes



Additional Info:
1. has tried to solve the problem by the following steps, but no way out.
(1) copy windows fonts such as simsun.ttc et. to /usr/share/fonts/Fonts, also copy simsun.ttc to ~/.config/libreoffice/4/user/fonts. 
(2) add language support of GB18030, GBK, GB2312 by language setting of Linux Mint.
2. the txt file can be correctly display by WPS offcie.
3. install dconf-editor, run dconf-editor, open org->x->editor->preferences->encodings, change the Value of auto-detected to 
['GB18030', 'UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16'], xed can correctly display the txt file.
4. change the Candidate Encodings of org.gnome.gedit.preference.encodings to ['GB18030', 'UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16'], gedit can correctly display the txt file.
Comment 1 quanzhong 2018-08-05 00:20:41 UTC
Created attachment 143967 [details]
the txt file to be openned
Comment 2 quanzhong 2018-08-05 00:22:47 UTC
Created attachment 143968 [details]
Error Displayed file contents
Comment 3 quanzhong 2018-08-05 00:23:57 UTC
Created attachment 143969 [details]
corrcet display of the file contents
Comment 4 Aron Budea 2018-08-11 03:00:41 UTC
When you are in the Open file dialog, choosing format 'Text - Choose Encoding' will let you select the mentioned GB18030 encoding, and using that will show the file correctly. Well, almost, because there's a display regression since 5.3, I opened bug 119211 on that.

Considering this bug, I'm not sure if the default encoding or order of priority can be changed (not, as far as I can see), one could argue that'd be a nice feature to have.
Comment 5 V Stuart Foote 2018-08-11 15:41:29 UTC
Yes, the GB-2312/GB-18030 must be opened using the file format "Text - Choose Encoding (*.txt)", and from that dialog select appropriate Character set (Chinese Simplified GB-18030 in this case), and Language (if not picked up from user locale).

If the OS provided file management does not allow selection of the text import filter type--then set to "false" the "UseSystemFileDialog" stanza (found in Tools -> Options -> Advanced: Expert Configuration dialog)--and use the LibreOffice file dialog to make the GB-18030 text filter selection.

Question might be if a properly set user local should pick up text encoding--but then is GB-2312/GB-18030 a proper "default" for simplified Chinese use locals?


=-testing with-=
Version: 6.2.0.0.alpha0+ (x64)
Build ID: 0a1a4ffb4f87adff7fbbbc60202b6a0e42fedd0c
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-08-08_23:17:46
Locale: en-US (en_US); Calc: group threaded