Bug 1323124 - [ja_JP] PDF file content shown incorrectly
Summary: [ja_JP] PDF file content shown incorrectly
Keywords:
Status: CLOSED DUPLICATE of bug 1238955
Alias: None
Product: Fedora
Classification: Fedora
Component: webkitgtk3
Version: 24
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-01 10:33 UTC by Bhushan Barve
Modified: 2017-04-10 09:34 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-10 09:34:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
ja_JP_garbled_evolution (137.65 KB, image/png)
2016-04-01 10:33 UTC, Bhushan Barve
no flags Details
jp_message (18.11 KB, application/pdf)
2016-04-04 11:10 UTC, Bhushan Barve
no flags Details
simple test message (262 bytes, text/plain)
2016-04-04 17:21 UTC, Milan Crha
no flags Details
ok pdf (10.87 KB, application/pdf)
2016-04-04 17:22 UTC, Milan Crha
no flags Details
bad pdf (48.48 KB, application/pdf)
2016-04-04 17:25 UTC, Milan Crha
no flags Details
test_ msg_mbox (5.52 KB, application/mbox)
2016-04-05 06:41 UTC, Bhushan Barve
no flags Details

Description Bhushan Barve 2016-04-01 10:33:38 UTC
Created attachment 1142506 [details]
ja_JP_garbled_evolution

Description of problem: For ja_JP, when e-mail preview or export to pdf is done, it shows garbled data. Please refer attached screenshot.


Version-Release number of selected component (if applicable):

Fedora 24 (ja_JP)
evolution-3.19.91-1.fc24.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Launch evolution (ja_JP)
2. compose an e-mail.
3. select preview or print to file(PDF)

Actual results:
The garbled data gets displayed

Expected results:
The data should be displayed properly.

Additional info:
Only e-mail fields are garbled. The e-mail body shows proper rendering.

Comment 1 Milan Crha 2016-04-01 11:38:38 UTC
Thanks for a bug report. Could you share the test message as well, please? Just that we use the same data.

From the screen shot:
- I do not know what that first (top) red rectangle should show, I'd expect
  a message Subject, where those squares are not meant to be there, right?
- the second red rectangle highlights correct text or incorrect? I do not read
  these languages, thus I do not know whether it's okay or not. I'm sorry.

Comment 2 Bhushan Barve 2016-04-04 11:10:12 UTC
Created attachment 1143307 [details]
jp_message

Comment 3 Bhushan Barve 2016-04-04 11:30:04 UTC
(In reply to Milan Crha from comment #1)
> Thanks for a bug report. Could you share the test message as well, please?
> Just that we use the same data.
> 
> From the screen shot:
> - I do not know what that first (top) red rectangle should show, I'd expect
>   a message Subject, where those squares are not meant to be there, right?
> - the second red rectangle highlights correct text or incorrect? I do not
> read
>   these languages, thus I do not know whether it's okay or not. I'm sorry.

Hi Milan,

I've uploaded the test message - attachment 1143307 [details]
This was printed to PDF with evolution run in en_US locale. The message preview/print to file was working fine even with the subject in Japanese. So looks like some issue with ja_JP locale.

Yes, the top rectangle (red) should show the message subject correctly.

The second rectangle highlights the incorrect text for message information(From, To, Date etc). The characters displayed there are not correct in Japanese. Looks like they are garbled too. Not sure where it is coming from.
Ideally the message sender/recipient fields should look like this:

From - 差出人
To - 宛先
Subject - 件名
Date - 日付

Please let me know if you need anything else from my side.

Comment 4 Milan Crha 2016-04-04 11:54:49 UTC
Thanks for the update. By sharing the test message, I meant an mbox format, like when you right-click the message in the message list and choose "Save as mbox", then replace any private information in it (like email addresses) and then upload it here.

I checked the ja.po file and it shows correct translation for the 'From' string, thus this might be something else than the translation itself.

I tried to reproduce this (watching the header names) on my development machine, where I build evolution locally and I see there the header names correctly. When I tried in a virtual machine, the header names got broken, as in your screen shot. I'll investigate this further.

I used `LANG=ja_JP.utf8 evolution` command for the tests.

Comment 5 Milan Crha 2016-04-04 17:19:50 UTC
This is weird. I added some prints around the code and I see on the console that the evolution passes correct string to the webkit, it says for the "From" string "<th class="header ltr">差出人:</th>" on the console, but in the print preview the text is changed. Not fully garbled, just different.

Comment 6 Milan Crha 2016-04-04 17:21:30 UTC
Created attachment 1143394 [details]
simple test message

Import this message into the evolution then run it from a terminal as:
   $ LANG=ja_JP.utf8 evolution
Select the message and Print->Print preview.

Comment 7 Milan Crha 2016-04-04 17:22:52 UTC
Created attachment 1143396 [details]
ok pdf

this is what gets generated on one machine, where all looks fine.

Comment 8 Milan Crha 2016-04-04 17:25:40 UTC
Created attachment 1143397 [details]
bad pdf

the generated PDF file which looks wrong.

The interesting thing is that when I select the wrong 'From' text and paste it into a terminal or gedit or similar UTF-8 capable application, then it is shown properly. I understand it that there happened some issue with a character mapping in the PDF file, thus lower in the stack, like in the cairo or similar, but this is only a guess.

I'm passing this bugreport to evince as a starter, for further investigation on the PDF files content.

Comment 9 Bhushan Barve 2016-04-05 06:41:12 UTC
Created attachment 1143677 [details]
test_ msg_mbox

Comment 10 Bhushan Barve 2016-04-05 06:44:29 UTC
Uploaded the mbox version of the message.

Also observed that, occasionally I'm getting following error in the terminal when tried to preview a message, and Evolution terminates: 

evolution: cairo-array.c:182: _cairo_array_index: アサーション `index < array->num_elements' に失敗しました。(-->failure)
中止 (コアダンプ) (-->core dump)

Comment 11 Marek Kašík 2016-04-05 12:20:06 UTC
Evince shows correctly the PDF. The characters are in fonts embedded in the file.
The problem is in its creation. It somehow uses fonts from adobe-source-han-sans-cn-fonts. The problem shows if you have them installed.
I'm reassigning this to webkit since from comment #5 it seems that it is the part which processes the text.

Comment 12 Tomas Popela 2017-04-10 09:34:16 UTC

*** This bug has been marked as a duplicate of bug 1238955 ***


Note You need to log in before you can comment on or make changes to this bug.