Adobe Flash Player 9 and 10 displays CJK text incorrectly

Bug #207198 reported by Yuren Ju
108
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Flash Installer
Fix Released
High
gill
flashplugin-nonfree (Ubuntu)
Invalid
Medium
Unassigned
Nominated for Hardy by Yuren Ju
Nominated for Intrepid by Anthony Fok
Nominated for Karmic by Qianqian Fang
Nominated for Lucid by Xhacker Liu

Bug Description

On Ubuntu 7.10, Adobe Flash player 9 can display Chinese or Japanese (and likely Korean) glyphs, but on Ubuntu 8.04 it doesn't work, displaying "squares" for non-Latin glyphs instead. It seems that "Bitstream Vera Sans" (with no font substitution) is used rather than "WenQuanYi Zen Hei" or other appropriate CJK fonts. A screenshot is attached.

Steps to reproduce:

 1. System -> Properties -> Language Support (from language-selector), and select one of the CJK locales as the default.

 2. Re-login as needed.

 3. Start Firefox and open e.g. http://www.tudou.com/ .

The same problem still plagues Ubuntu 10.04 LTS (lucid) beta 1 with Adobe Flash Player: flashplugin-installer 10.0.45.2ubuntu1.

Tags: fonts
Revision history for this message
Yuren Ju (yurenju) wrote :
Revision history for this message
Yuren Ju (yurenju) wrote :

here is a way to fix the bug, just remove /etc/fonts/conf.d/49-sansserif.conf, and everything work fine.

Revision history for this message
Arne Goetje (arnegoetje) wrote :

Thanks for reporting this issue.
However I don't believe that removing 49-sansserif.conf is the "right way" to solve this issue.

Could you please attach the following output:

fc-match -s sans-serif

1. with 49-sansserif.conf enabled
2. with 49-sansserif.conf disabled

Thanks

Revision history for this message
Yuren Ju (yurenju) wrote :

it's the same, details in attachment.

Revision history for this message
Yuren Ju (yurenju) wrote :

this is disable sans-serif result

Revision history for this message
missmomo0911 (missmomo0911) wrote :

I have test Flash in Firefox, and this bug fixed.

Revision history for this message
Daitau Aaron (daitau) wrote :

  I don't think it is fixed yet. When I try sites like http://hk.youtube.com/ the Chinese characters are still not okay (see attachment.) Have you made any manual fixes?

Revision history for this message
missmomo0911 (missmomo0911) wrote :

No,I didn't made any manual fixes.
My system is Kubuntu-KDE4 RC with kde-i18n-zhtw and kde-l10n-zhtw package.
The picture is youtube taiwan.

Revision history for this message
missmomo0911 (missmomo0911) wrote :

I've check the bug again in Kubuntu-KDE4,and I find the bug is not appear is because flashplugin-nonfree in Kubuntu-KDE4 is English.

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

Same problem here, for Japanese. I have opened question , but no one could answer... Here is the question text:
Flash videos with Japanese text do not show correctly. They look all garbled, as if the encoding was not set correctly. Kind of same as if you set the encoding to EUC-JP on a page with S-JIS or ISO-2022-JP encoding.

An example is http://costadelsol.co.jp/index.html, where the menu is ok, but the text under "News" is not. Also same in all Japanese Youtube videos. Problem appears in Firefox and Konqueror as well.

I am just wondering if I am missing some fonts, required by Flash (msttcorefonts are installed)? Or is there some other problem? Both Flash 9 and 10 beta look the same.

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

Same problem here, for Japanese. I have opened question #39246, but no one could answer... Here is the question text:
Flash videos with Japanese text do not show correctly. They look all garbled, as if the encoding was not set correctly. Kind of same as if you set the encoding to EUC-JP on a page with S-JIS or ISO-2022-JP encoding.

An example is http://costadelsol.co.jp/index.html, where the menu is ok, but the text under "News" is not. Also same in all Japanese Youtube videos. Problem appears in Firefox and Konqueror as well.

I am just wondering if I am missing some fonts, required by Flash (msttcorefonts are installed)? Or is there some other problem? Both Flash 9 and 10 beta look the same.

description: updated
Changed in flashplugin-nonfree:
status: New → Incomplete
Revision history for this message
John Vivirito (gnomefreak) wrote : Re: [Bug 207198] Re: Adobe flash player 9 can't display chinese font

David Nemeskey wrote:
> Same problem here, for Japanese. I have opened question #39246, but no one could answer... Here is the question text:
> Flash videos with Japanese text do not show correctly. They look all garbled, as if the encoding was not set correctly. Kind of same as if you set the encoding to EUC-JP on a page with S-JIS or ISO-2022-JP encoding.
>
> An example is http://costadelsol.co.jp/index.html, where the menu is ok,
> but the text under "News" is not. Also same in all Japanese Youtube
> videos. Problem appears in Firefox and Konqueror as well.
>
> I am just wondering if I am missing some fonts, required by Flash
> (msttcorefonts are installed)? Or is there some other problem? Both
> Flash 9 and 10 beta look the same.
>
> ** Description changed:
>
> - on ubuntu 7.10, flash player 9 can display chinese fonts, but on ubuntu
> - 8.04 it doesn't work. attachment file is screenshot.
> + on ubuntu 7.10, flash player 9 can display chinese or Japanese fonts,
> + but on ubuntu 8.04 it doesn't work. attachment file is screenshot.
>
>
Have you installed language-pack-gnome-whatever countrycode for the
language you would like to use.
language-pack-gnome-ja
language-pack-gnome-ja-base
language-pack-gnome-zh
language-pack-gnome-zh-base

Also please remove any extensions/adddons you have installed other than
flashplugin-nonfree.
If you have flashblock from mozilla addons page i would start with that one.
Im not sure yet that this bug relates to fontconfig.

--
Sincerely Yours,
    John Vivirito

https://launchpad.net/~gnomefreak
https://wiki.ubuntu.com/JohnVivirito
Linux User# 414246

Anthony Fok (foka)
description: updated
Revision history for this message
Anthony Fok (foka) wrote : Re: Adobe Flash player 9 cannot display Chinese font

On further investigation, it appears that this bug has to do with an interaction between:

 * /etc/fonts/conf.d/49-sansserif.conf (from fontconfig-config), and

 * /etc/fonts/conf.d/69-language-selector-zh-cn.conf (from language-selector-common)
    (substitute "zh-cn" for other locales)

Quite a few Ubuntu users have blogged about this problem, and the usual quick fix is to get rid of /etc/fonts/conf.d/49-sansserif.conf , or change the append_last "sans-serif" therein to some other font. That said, I agree with Arne's assessment: Removing 49-sansserif.conf does not seem to be the "right way", especially since this file is part of the upstream source, probably added by Keith Packard himself?

This trick works for me:
   $ cd /etc/fonts/conf.d/
   $ sudo mv 69-language-selector-zh-cn.conf 48-language-selector-zh-cn.conf

Such that the Chinese-specific "prepend" config is sourced first. Please try and see if this trick works for you too.

I also tried playing with the following command (under the zh_CN.UTF-8 locale):

    $ FC_DEBUG=1 firefox http://www.tudou.com/

Checking the of the debug output, it appears that Adobe Flash is trying to search for the appropriate font similar to the following command:

    $ FC_DEBUG=1 fc-match '/usr/share/fonts/truetype/ttf\-bitstream\-vera/Vera.ttf':scalable=true

With 49-sansserif.conf and 69-language-selector-zh-cn.conf, fc-match returns:
    Vera.ttf: "Bitstream Vera Sans" "Roman"

With 48-language-selector-zh-cn.conf and 49-sansserif.conf, fc-match returns:
    wqy-zenhei.ttf: "WenQuanYi Zen Hei" "中等"

Arne, what do you think? Would that be an appropriate fix for language-selector?

Thanks,

Anthony

Changed in language-selector:
status: New → Confirmed
Revision history for this message
David Nemeskey (nemeskeyd) wrote :

Actually I don't know how the language selector works, but what about the language_selector/fontconfig files? Why aren't they used by the Flash Player?

Also, if you make this change, will Latin (like English) text be displayed by the Chinese font? Because that just won't do, the Latin part of East Asian fonts is too ugly. And please don't forget about Japanese either :)
(And here comes the question: which one should get a lower number? Japanese or Chinese? I would hate to see Chinese glyphs in Japanese text...)

Revision history for this message
Arne Goetje (arnegoetje) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 cannot display Chinese font

David Nemeskey wrote:
> Actually I don't know how the language selector works, but what about
> the language_selector/fontconfig files? Why aren't they used by the
> Flash Player?

According to Anthony's statement, flashplayer uses fc-match to query the
Bitstream font. As the fontconfig files provided by language-selector
*are* used by fontconfig, I guess the bug is that flashplayer queries
for Bitstream and not for "sans", which should provide the appropriate
CJK font, depending on your fontconfig settings. But I could be wrong
with this and the bug is actually somewhere else...

I will investigate this issue further... please give me some time, as
I'm flooded with work currently.

> Also, if you make this change, will Latin (like English) text be displayed by the Chinese font? Because that just won't do, the Latin part of East Asian fonts is too ugly. And please don't forget about Japanese either :)
> (And here comes the question: which one should get a lower number? Japanese or Chinese? I would hate to see Chinese glyphs in Japanese text...)

This is an issue we cannot fix at the moment, but it's on my agenda.
Proper handling of CJK fonts in applications would need the text which
is to be rendered to be tagged with the appropriate language tag. Then,
fontconfig can provide an appropriate font to render that text.
In other words, the texts would need to use some markup language (like
xml) to carry the language tag, and the applications, which display such
texts, would need to parse those tags and ask the rendering engine to
honor the lang tag.
So, IMHO all applications which handle text display, need to be fixed to
support lang tags. Unfortunately this not something I can do. This issue
needs to be addressed upstream for each application and library separately.

Revision history for this message
David Nemeskey (nemeskeyd) wrote : Re: Adobe Flash player 9 cannot display Chinese font

I am just a regular user, but I am not really sure if this is a solution.

> I guess the bug is that flashplayer queries for Bitstream and not for "sans", which should provide the
> appropriate CJK font, depending on your fontconfig settings. But I could be wrong with this and the
> bug is actually somewhere else...
Have you (or someone) contacted Adobe about this bug? Since all applications except Flash Player behave correctly, it would be pretty safe to assume that it is the culprit. I have looked for Japanese-related bugs in the Adobe bug database, and only found these two:

https://bugs.adobe.com/jira/browse/FP-98
https://bugs.adobe.com/jira/browse/FP-136

The second is not relevant, and the first doesn't seem to be an exact hit, either. I guess opening a new one would not hurt, provided the problem is really with the plugin.

> So, IMHO all applications which handle text display, need to be fixed to support lang tags.
> Unfortunately this not something I can do.
Yes, and let's not forget that it cannot even be done for all applications. Even if the Linux part is alright, what about, say, MSN in Kopete, etc?

Yes, language tags are a good and long-missing feature, but until they become a reality, we still need to tell the system our preferences: Chinese or Japanese first. And for me, it's definitely Japanese. If it can be done in the 48-whatever.conf, fine, but it still seems like a big hack.

Daniel T Chen (crimsun)
Changed in flashplugin-nonfree:
importance: Undecided → Low
status: Incomplete → Confirmed
Changed in fontconfig:
status: New → Confirmed
Revision history for this message
Charlie Kravetz (cjkgeek) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Jaunty Jackalope. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu.

I did test this in Jaunty 9.04 dated 2009-03-05, with firefox 3.0.7. I used the http://www.tudou.com/ website, To the best of my knowledge, it is now displaying the characters correctly with no changes made other than adding flashplugin-nonfree. It would be appreciated if this could be confirmed as fixed by the reporter.

Thanks again and we appreciate your help.

Changed in flashplugin-nonfree:
status: Confirmed → Incomplete
Revision history for this message
Rolf Leggewie (r0lf) wrote :

At least for Japanese pages, I still have to move 49-sansserif.conf to a lower priority. It does not work OOTB.

Charlie, are you sure you did not apply one of the workaround above?

Revision history for this message
portis (portis24) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

It's not fixed. Some chinese characters are displayed as a dot.

On Fri, Mar 6, 2009 at 8:27 AM, Rolf Leggewie <launchpad.net@
rolf.leggewie.biz> wrote:

> At least for Japanese pages, I still have to move 49-sansserif.conf to a
> lower priority. It does not work OOTB.
>
> Charlie, are you sure you did not apply one of the workaround above?
>
> --
> Adobe Flash player 9 displays CJK text incorrectly
> https://bugs.launchpad.net/bugs/207198
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Charlie Kravetz (cjkgeek) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly

@Rolf: positive that I installed Jaunty, installed flashplugin-nonfree, and tested at the website. It makes it pretty simple know if any modifications were made when I intentionally installed Jaunty to test the bug. I also am positive it was not an upgrade, which can leave modifications present.

Thanks for confirming the bug is still present in Jaunty. I am marking it triaged, and we will hope for a fix one day that works for all languages.

Changed in flashplugin-nonfree:
status: Incomplete → Triaged
Revision history for this message
Feistybird (bryanjen-tw) wrote :

Wrong Sans-Serif config causing Chinese font display error in Adobe Flash Player and some other GTK programs

It can be solved if /etc/fonts/conf.avail/69-language-selector-zh-tw.conf is configured properly:

=== Before Edit ===
  <test qual="any" name="family">
   <string>sans-serif</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
   <string>Bitstream Vera Sans</string>
   <string>DejaVu Sans</string>
   <string>WenQuanYi Zen Hei</string>
   <string>AR PL UMing TW</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>WenQuanYi Bitmap Song</string>
   <string>AR PL UKai TW</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
=== == ===

**** After Edit ****

 <test qual="any" name="family">
   <string>sans-serif</string>
  </test>
  <edit name="family" mode="prepend" binding="strong">
   <string>WenQuanYi Zen Hei</string>
   <string>AR PL UMing TW</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>WenQuanYi Bitmap Song</string>
   <string>Bitstream Vera Sans</string>
   <string>DejaVu Sans</string>
   <string>AR PL UKai TW</string>
   <string>AR PL ZenKai Uni</string>
  </edit>
************************

Edit "/etc/fonts/conf.d/49-sansserif.conf" could also solve the problem:

Replace all "sans-serif" with "sans serif"

Revision history for this message
Andrew Hawkins (akai-kenshi) wrote :

This bug still affects certain sites under Jaunty and 64-bit Flash 10 alpha. I couldn't get any of the aforementioned workarounds to work.

Revision history for this message
ZhengPeng Hou (zhengpeng-hou) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

On Thu, Jun 11, 2009 at 04:38:26AM -0000, Feistybird wrote:
> Wrong Sans-Serif config causing Chinese font display error in Adobe
> Flash Player and some other GTK programs
>
> It can be solved if /etc/fonts/conf.avail/69-language-selector-zh-
> tw.conf is configured properly:
>
> === Before Edit ===
> <test qual="any" name="family">
> <string>sans-serif</string>
> </test>
> <edit name="family" mode="prepend" binding="strong">
> <string>Bitstream Vera Sans</string>
> <string>DejaVu Sans</string>
> <string>WenQuanYi Zen Hei</string>
> <string>AR PL UMing TW</string>
> <string>AR PL ShanHeiSun Uni</string>
> <string>WenQuanYi Bitmap Song</string>
> <string>AR PL UKai TW</string>
> <string>AR PL ZenKai Uni</string>
> </edit>
> === == ===
>
> **** After Edit ****
>
> <test qual="any" name="family">
> <string>sans-serif</string>
> </test>
> <edit name="family" mode="prepend" binding="strong">
> <string>WenQuanYi Zen Hei</string>
> <string>AR PL UMing TW</string>
> <string>AR PL ShanHeiSun Uni</string>
> <string>WenQuanYi Bitmap Song</string>
> <string>Bitstream Vera Sans</string>
> <string>DejaVu Sans</string>
> <string>AR PL UKai TW</string>
> <string>AR PL ZenKai Uni</string>
> </edit>
> ************************
>
> Edit "/etc/fonts/conf.d/49-sansserif.conf" could also solve the problem:
I have unlinked /etc/fonts/conf.d/49-sansserif.conf, seems everything
is fine, maybe we can drop this file.
>
> Replace all "sans-serif" with "sans serif"
>
> --
> Adobe Flash player 9 displays CJK text incorrectly
> https://bugs.launchpad.net/bugs/207198
> You received this bug notification because you are a member of Ubuntu
> CJK Testers, which is a direct subscriber.

Revision history for this message
Jonathan Lumb (jonolumb) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly

This bug seems to be fixed now in Karmic

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I still experience at least occasional problems even in karmic. One example is http://www.jal.com/ which displays only squares in FF. I find it interesting that chromium browser on the same computer displays the same page just fine.

Revision history for this message
Qianqian Fang (fangq) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

Jonathan Lumb wrote:
> This bug seems to be fixed now in Karmic

not really. I had this problem with a freshly installed Karmic Xubuntu
alpha 5. see my attachment. The flash to test can be browsed at

 http://wenq.org/demo/fontopia_droid_tutorial.htm

I think it is really important to fix this before the final release.
Otherwise,
it might have chance to annoy every user using CJK languages.

Rolf Leggewie (r0lf)
Changed in flashplugin-nonfree (Ubuntu):
importance: Low → Medium
Changed in fontconfig (Ubuntu):
importance: Undecided → Medium
Changed in language-selector (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Arne Goetje (arnegoetje) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly

OK, so, with the above suggested solution of moving 69-language-selector-LANGCODE.conf down to 48, does this fix the problem in Karmic? If yes, then I will do the change in language-selector.

For non-CJK users this shouldn't cause any issues, since these files are only activated, when the users chooses a CJK language as his preferred Desktop language, or the user manually runs fontconfig-voodoo with his desired LANGCODE as the argument in order to explicitly prefer CJK fonts over the default selection done by fontconfig.

Changed in language-selector (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Rolf Leggewie (r0lf) wrote :

It may fix something. But it surely does not eliminate the problem completely. Current situation (which may be even independent of the 69/48 move) in karmic with adobe-flashplugin 10.0.22.87-2jaunty1 from the partner repo is as follows

www.jal.com:
- OK in Chromium (non-flash site gets loaded, it seems)
- squares in both FF profiles I have

www.jal.co.jp/dom_network/:
- OK in Chromium
- squares in FF profile 1
- OK in FF profile 2

At least for me, this issue is browser- and profile-dependent.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Actually, what I said is not correct. After all, it seems the effects are the same in all profiles and both FF and Chromium.

http://www.jal.com is broken (non-flash page displays fine when flash is deactivated, as is default in Chromium)
http://www.jal.co.jp/dom_network is OK
http://jal.innosked.com/(S(lkamwd55dpqyhbjoqzvgbx45))/Default.aspx?lang_id=JA&region_id=JAPAN is broken

As such, this may hint at an improperly coded website.

But, 48 or 69 does not seem to make a difference here (I restarted Chromium and FF after the changes, XFCE session unchanged). I may have tweaked the fontconfig files at some time in the past, I don't remember now.

Revision history for this message
Qianqian Fang (fangq) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

this partially works for in karmic virtualbox. please see the attachment.

the Han characters now show up, however, they are displayed with
Uming (serif), but Latins are shown in sans-serif. This is certainly
better than seeing blank squares.

what font pattern exactly does the flash player look for?

Arne Goetje wrote:
> OK, so, with the above suggested solution of moving 69-language-
> selector-LANGCODE.conf down to 48, does this fix the problem in Karmic?
> If yes, then I will do the change in language-selector.
>
> For non-CJK users this shouldn't cause any issues, since these files are
> only activated, when the users chooses a CJK language as his preferred
> Desktop language, or the user manually runs fontconfig-voodoo with his
> desired LANGCODE as the argument in order to explicitly prefer CJK fonts
> over the default selection done by fontconfig.
>
> ** Changed in: language-selector (Ubuntu)
> Status: Confirmed => Incomplete
>
>

Revision history for this message
Arne Goetje (arnegoetje) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

Qianqian Fang wrote:
> this partially works for in karmic virtualbox. please see the
> attachment.
>
> the Han characters now show up, however, they are displayed with
> Uming (serif), but Latins are shown in sans-serif. This is certainly
> better than seeing blank squares.

That can be adjusted.

> what font pattern exactly does the flash player look for?

That's a very good question. If anyone has some hints on how to find
out, please let us know.

Revision history for this message
Qianqian Fang (fangq) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly

hi Arne

I found your work-around was still not included in a recently updated karmic, any reason not to include it?

AFAIK, this problem is likely the most frequently asked issue among Ubuntu Chinese users, and, if still not too late, please at least commit your work-around (I haven't seen any side effects).

Revision history for this message
Jonathan Lumb (jonolumb) wrote :

Yup... once again chinese characters are not displaying in flash videos in Firefox. It used to work out of the box, why is this no longer the case?

Revision history for this message
ZhengPeng Hou (zhengpeng-hou) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

To Arne
can we drop the symbol link of 49-sansserif.conf?
On Sun, Oct 18, 2009 at 5:33 PM, Jonathan Lumb <email address hidden> wrote:
> Yup... once again chinese characters are not displaying in flash videos
> in Firefox. It used to work out of the box, why is this no longer the
> case?
>
> --
> Adobe Flash player 9 displays CJK text incorrectly
> https://bugs.launchpad.net/bugs/207198
> You received this bug notification because you are a member of Ubuntu
> CJK Testers, which is a direct subscriber.
>

Aron Xu (happyaron)
tags: added: fonts
Changed in ubuntu-translations:
assignee: nobody → Aron Xu (happyaron)
importance: Undecided → Medium
status: New → Confirmed
Aron Xu (happyaron)
tags: added: cjk
Revision history for this message
Zeniff (zeniffmartineau) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly

I don't know if this is related, but in Flash 10, I can see CJK, but cannot type it. Although, I can in Flash 10 when using Windows. It seems like an encoding issue (although the website was in the correct encoding), but I don't know how to change the encoding that Flash uses.

I'm using SCIM, but I haven't tried with Ibus, yet.

Here's the website where I cannot type Chinese (choose the first section, then Vocabulary, and then the typing game):
http://edu.ocac.gov.tw/lang/chineselearn/

Revision history for this message
Qianqian Fang (fangq) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

@ Zeniff

just want to let you know, the input method problem is now reported
in a separate thread: bug#472787

Zeniff wrote:
> I don't know if this is related, but in Flash 10, I can see CJK, but
> cannot type it. Although, I can in Flash 10 when using Windows. It seems
> like an encoding issue (although the website was in the correct
> encoding), but I don't know how to change the encoding that Flash uses.
>
> I'm using SCIM, but I haven't tried with Ibus, yet.
>
> Here's the website where I cannot type Chinese (choose the first section, then Vocabulary, and then the typing game):
> http://edu.ocac.gov.tw/lang/chineselearn/
>
>

Revision history for this message
Zeniff (zeniffmartineau) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly

Oh! Sorry about that! I should have searched for that again. I searched last month, but couldn't find the any information that time. Sorry and thank you!

Revision history for this message
Qianqian Fang (fangq) wrote :

I am attaching some debug output for this bug. The debug dump was made by the following command:

  FC_DEBUG=1029 firefox http://google.com > debug_output

when firefox finished loading the initial page at google.com, I then clicked on a shortcut to http://1g1g.com (a flash music player); once the flash page fully loaded, I closed the firefox session.

I did this test with the original 49-sansserif.conf on Karmic (attachment old_49-sansserif.txt.gz), and also a modified version by replacing the append_last family from sans-serif to WenQuanYi Zen Hei (attachment new_49-sansserif.txt.gz). The later case can display Hanzi glyph properly with Zen Hei, but the first one show empty squares (firefox turned out using Dejavu Sans to show all characters).

If you do a diff of the two outputs:
  diff new_49-sansserif.txt old_49-sansserif.txt > fontdiff.txt

search for "40894c41397" in fontdiff.txt, and read the following couple of diff blocks, you may see some major differences: because the original 49-sansserif.conf sets sans-serif as the fallback, this will keep propagate and prepends DejaVu fonts in front of this alias, and makes the results different (search for 41022c41617). I only don't understand where "Eras Bold ITC" comes from (search for "44861d43291" in fontdiff.txt).

From this, it appears to me that flash failed to render the Hanzi glyphs because it does not do fall-back operations: whatever first match fontconfig come up with, it simply use it to render all text. Setting "WenQuanYi Zen Hei" as the fall-back in 49-sansserif.conf accidentally stopped the propagation of sans-serif alias and freezes the best match to a font happening to have CJK glyphs.

Does this sound reasonable? any other findings?

Revision history for this message
Qianqian Fang (fangq) wrote :
Revision history for this message
Qianqian Fang (fangq) wrote :

please don't be confused about the "WenQuanYi Micro Hei" rules before the "40894c41397" mark in fontdiff.txt, that's the Application font I set in the Appearance Font Preference dialog. I believe the lines before "40894c41397" are the rules to determine the font name to render firefox menu and toolbars.

Aron Xu (happyaron)
tags: removed: cjk
Revision history for this message
Xhacker Liu (xhacker) wrote :

Such a long time passed, why the bug is still exist? In Lucid, the flash player still display Chinese incorrectly!

Revision history for this message
Aron Xu (happyaron) wrote :

On my fresh Karmic installation, removing 49-sansserif.conf doesn't make sense for all sites, but changing it to what I attach here, everything works perfectly.

Revision history for this message
Qianqian Fang (fangq) wrote : Re: [Bug 207198] Re: Adobe Flash player 9 displays CJK text incorrectly

Aron Xu wrote:
> On my fresh Karmic installation, removing 49-sansserif.conf doesn't make
> sense for all sites, but changing it to what I attach here, everything
> works perfectly.
>
> ** Attachment added: "49-sansserif.conf"
> http://launchpadlibrarian.net/37404171/49-sansserif.con

this just happened to be working. "wqy-zenhei" is a file name,
not the font name. Because it does not match anything, it is
the same as to delete this file.

As determined from my tests in #38
<https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/207198/comments/38>,
I believe the fundamental
issue is that flash plugin does not support glyph fall-back, and
always use the first font to render everything, even for
glyphs it does not cover. It would be great that Adobe
developers are aware of this and work out a fix. However,
I strongly support to commit a work-around (many of them
are listed in this thread) first. This is a high-priority
bug, and effects millions of users. A work-around, even
not perfect, can save tons of hours before the upstreams
finish their fixes. Please react before the next release
arrives, otherwise, the wait will be hopelessly long.

Revision history for this message
Qianqian Fang (fangq) wrote : Re: Adobe Flash player 9 displays CJK text incorrectly
Revision history for this message
Aron Xu (happyaron) wrote :

I think this problem should have a higher priority, raise importance from Medium to High.

Changed in ubuntu-translations:
importance: Medium → High
Revision history for this message
alwaysanewbie (glennh) wrote :

Thanks for your input, Aron Xu!
Editing 49-sansserif.conf worked for me too on my English-based Karmic system. I can view the Japanese flash sites with no problem now.

Aron Xu (happyaron)
Changed in ubuntu-translations:
assignee: Aron Xu (happyaron) → nobody
Revision history for this message
Xhacker Liu (xhacker) wrote :

How's going on with this bug?

Anthony Fok (foka)
summary: - Adobe Flash player 9 displays CJK text incorrectly
+ Adobe Flash Player 9 and 10 displays CJK text incorrectly
description: updated
Revision history for this message
Jonathan Lumb (jonolumb) wrote :

oh dear... how embarrassing... this bug is STILL here in Lucid!! I can't even remember how long this has been around for.

Just in case any developers don't quite understand the implications of this bug... it means that:

Any Japanese, Korean or Chinese text in a flash video will not be viewable. That pretty much means that sites like Youtube which rely almost entirely on flash - and especially their equivalents overseas - will be COMPLETELY UNUSABLE.

So I would strongly recommend that the priority of this bug is upped and that it is squashed before the Lucid release... otherwise Ubuntu is bound to be a big flop in the most populated country on the planet... now that would be a shame. The fix is there... why isn't it implemented?

Revision history for this message
WangLu (coolwanglu) wrote :

I also suffer from this bug. Ubuntu lucid beta

My situation is that I have two preferred fonts for 'sans-serif' defined in my ~/.fonts.conf, the first is DejaVu for Latin characters, and the second is FangZheng for CJK.

Now if I remove the first font in my ~/.fonts.conf, leaving only the second, flash will display Chinese characters correctly, but latin letters in other normal applications will become ugly.

For Aron's patch, it works for me, but it'll affect other applications. The meaning of the patch if to append 'wenquanyi' font for all non-wenquanyi font, then my preferred CJK font defined in ~/.fonts.conf won't be chosen.

For example, I use Comic Sans for titlebar, and if CJK character appears there, according to ~/.fonts.conf, FangZheng will be chosen, But applying Aron's patch will disable it, since 'wenquanyi' instead of 'sans-serif' will be appended

Of course I can change the font in sanserif.conf to be my favorite one, but I sugguest only the last string should be replaced -- that's the way it's designed to be.

On the other hand, it's bad for us 'have to' modify a global conf file, maybe we can give 50-user a higher privilege?

Revision history for this message
Xhacker Liu (xhacker) wrote :

Please fix this huge bug as soon as possible. It annoy many CJK users. And Lucid is getting closer and closer....

Thanks.

BTW, the flash plugin embed in Google Chrome behave great.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

I just revisited this bug. And the pages I tried were displaying fine (although some of the fonts looked a bit ugly). costadelsol.co.jp remained broken, but I think that is due to faulty web programming on their end (missing encoding declaration or something like that).

Anybody still affected by this bug, please provide URLs to verify the problem. I did not test all URLs given in this ticket, but I tried a few and with the exception above all seemed to work fine. Please be sure to update to the latest lucid releases, there's been some font work recently.

Revision history for this message
MilchFlasche (robertus0617) wrote :

We can just take any one of the YouTube pages for example, like this one: http://www.youtube.com/watch?v=JM1dvSQK6q8&feature=related

See my attachment, and we can see that in the Flash plugin settings dialog, and the Google Ad below in the frame, the Chinese characters are all in squares.

Platform: freshly installed Kubuntu 10.04
Flash plugin version: 10.0.45

AFAIK, Flash plugin 10.1 beta has resolved partially this bug, so I'd suggest that we can include that ASAP, or announce to people affecting by this bug (must be hundreds of millions of them in the CCJK countries) to suggest them to manually update to 10.1 plugin until there is a gold release, so to fix this annoying problem.

Workarounds like modifying /etc/fonts/conf.d/49-sansserif.conf is not acceptable, since it denies the ability to link English fonts and Chinese fonts all as sans-serif.

Revision history for this message
MilchFlasche (robertus0617) wrote :
Revision history for this message
Andrew Hawkins (akai-kenshi) wrote :

The Chinese and Japanese subtitles on videos at http://www.ted.com/ and still showing up as squares with Flash 64-bit alpha on Lucid 64-bit.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Andrew, thank you for your comment. ted.com seems like an interesting website. The subtitles in both Chinese and Japanese display fine on my netbook (64-bit system, but 32-bit installation).

Revision history for this message
MilchFlasche (robertus0617) wrote :

Not on my 32-bit Lucid RC. (Ted.com, see the attached)

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Are you sure you have the necessary fonts installed? It looks like configuration issue to me.

Revision history for this message
MilchFlasche (robertus0617) wrote :

I'm using freshly installed Lucid RC with proper language support. Also you can see on the top of the screenshot, the Chinese HTML texts are displaying well. But not the Chinese subtitles in the Flash.

Actually you're right, it has to do with font configuration. Allow me to guess, in your ~/fonts.conf or language-selector.conf, you're using a font including CJK coverage for the first priority sans-serif. So it's enough for your Flash plugin to display Japanese fonts.

"Shouldn't this be the sufficient answer to the question?" you might ask. However, before recently, most fonts with CJK coverage, their alphanumeric parts are not so beautiful compared to genuine Western fonts. So we'd need to set in the fonts.conf to use first a nice-looking Western font as sans-serif, then when encountering CJK glyphs, falling back to second or third setting (nice-looking CJK fonts for examply). This is the so gentle and free mechnism which fontconfig was made for.

But because of the discrepancy of Adobe plugin (which is almost the only fully working Flash plugin in the market), there remains no flexibility to configure font displaying as freely. As we have know, the plugin before 10.1 could just recognize the first priority in the sans-serif list, and did not allow falling back to second, third... ones, so if unfortunately we insist to use a font without CJK coverage as the first sans-serif candidate, then those happy squares will just hang around when CJK glyphs go on the stage.

My opinion is that this bug is still there (unless people do some fonts.conf workaround which is not ideal), and what we can do is keep reporting to the upstream to urge Adobe to improve their plugin. If they don't make the plugin support fully fontconfig benefits, then people on Linux would need a font with full coverage of all the Unicode codepoints, with every part nice-looking, which is almost impossible to exist.

Revision history for this message
MilchFlasche (robertus0617) wrote :

Fortunately, thank God, Adobe has got progress (finally), and hopefully this bug can be resolved upstream, so that the font rendering of Flash plugin will be consistent with other Linux GUI toolkits, which have respected fontconfig settings these long years.

Revision history for this message
Zhao Zheng (zhaozhengcn) wrote :

I am running freshly installed Lucid 32-bit and I am affected by this issue. Currently I have used the workaround by modifying the /etc/fonts/conf.d/49-sansserif.conf as suggested by this post:
http://sprayfly.com/2008/11/21/chinese-characters-do-not-display-in-adobe-flash-or-adobe-air-on-ubuntu-%E8%A7%A3%E5%86%B3ubuntu%E4%B8%8Badobe-flash-adobe-air%E7%9A%84%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81%E9%97%AE%E9%A2%98%EF%BC%89/

From this website I immediately see the squares displayed properly after the modification:
www.1g1g.com

Revision history for this message
Qianqian Fang (fangq) wrote :

I confirmed that with the recent adobe flash update (10.1.53.64), the CJK text issue was fixed for Lucid.

Revision history for this message
Arne Goetje (arnegoetje) wrote : Re: [Bug 207198] Re: Adobe Flash Player 9 and 10 displays CJK text incorrectly

On 06/13/2010 12:22 PM, Qianqian Fang wrote:
> I confirmed that with the recent adobe flash update (10.1.53.64), the
> CJK text issue was fixed for Lucid.
>
Since the same version was pushed to all other supported stable
releases, does that mean we can finally close this bug?

Revision history for this message
David Planella (dpm) wrote :

Marked as Fix Released as per comment #61

Please feel free to reopen it if you think it has not been yet fixed. Thanks!

Changed in ubuntu-translations:
status: Confirmed → Fix Released
Revision history for this message
Andrew Hawkins (akai-kenshi) wrote :

I tried it with Adobe's latest Flash 64 beta (10.2 d161), Chinese and Japanese subtitles still don't display correctly on TED.com videos.

Revision history for this message
Marco Giancotti (ma.giancotti) wrote :

I have this problem too with Japanese subtitles on TED videos and captions in Youtube. I'm on Ubuntu 10.10, using google-chrome with the Shockwave Flash 10.1 r103 plugin (flashplugin-installer) installed. The locale is ja_JP.utf8.

Revision history for this message
Marco Giancotti (ma.giancotti) wrote :

I forgot to add that I'm on a 32-bit system.

The weird thing is that in sites like www.jal.com and www.1g1g.com the characters are displayed correctly, but the subtitles in TED.com do not. Also, hovering the mouse over the "CC" (closed captions) button in youtube (like in this video http://www.youtube.com/watch?v=diTpeYoqAhc&cc=1 ) shows only squares. However Japanese text looks fine when hovering on all the other buttons in the same page.

Revision history for this message
computermacgyver (computermacgyver) wrote :

This issue is affecting me on 11.10, 64 bit trying to view Japanese characters. None of the solutions here help to resolve the issue.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2011-12-04 16:57, computermacgyver wrote:
> This issue is affecting me on 11.10, 64 bit trying to view Japanese
> characters.

Didn't the solution to bug #759882 (dropping DejaVu) make a difference?

Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

Does this still occur? Which Ubuntu/ Flash version do you use?

Changed in flashplugin-nonfree (Ubuntu):
status: Triaged → Incomplete
Changed in fontconfig (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Andrew Hawkins (akai-kenshi) wrote :

I found a solution for the display of Japanese text that works on my computer from this blog entry (Japanese): http://blog.minawa.net/2011/10/hululinux.html

It seems that the Flash plugin refers to ttf-kochi-mincho, a font that no longer is shipped with Ubuntu. Installing it will fix the display issue instantly.

In a terminal, type:

sudo apt-get install ttf-kochi-mincho

Now, Kochi is a rather ugly font for a lot of people. Using a different font requires a bit of hacking, you have to overwrite ttf-kochi-mincho with something else. In this case we'll use Takao PGothic, one of the default Japanese fonts in Ubuntu.

In a terminal, type:

sudo cp /usr/share/fonts/truetype/takao/TakaoPGothic.ttf /usr/share/fonts/truetype/kochi/kochi-mincho-subst.ttf

You can replace 'TakaoPGothic.ttf' with any Japanese font you like. Right now, I'm using one called 'Motoya L Cedar.'

Revision history for this message
Fumihito YOSHIDA (hito) wrote :

@akai-kenshi san,

IMHO, this problem's root cause is Flash Player 9/10 implementations, they hard-code a explicit fontnames. And, Flash Player 11(and later), they use fontconfig approach, it is good solver for CJK problem.
Therefor, In now, we can display CJK glyphs with the right fontconfigs.

And, in Japanese, Ubuntu 11.10(and later) have a right fontconfigs with language-selector-common packages, you can display CJK glyphs in Flash(include Hulu).

So, I have two questions about this issue,
 - 1. Can you reproduce this issue?
 - 2. What version of Ubunutu/Flash packages?

Revision history for this message
Andrew Hawkins (akai-kenshi) wrote :

@Yoshida-san:

1) Before, if I opened any Flash videos with Japanese text (such as this one: http://www.ted.com/talks/lang/ja/rives_reinventing_the_encyclopedia_game.html), the text would appear as small boxes with 'x' in them.

2) I'm on Ubuntu 12.04 64-bit, using Flash 11.2.

Changed in flashplugin-nonfree (Ubuntu):
status: Incomplete → Confirmed
Changed in fontconfig (Ubuntu):
status: Incomplete → Confirmed
Changed in language-selector (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Fumihito YOSHIDA (hito) wrote :

@akai-kenshi san,

Thanks for your report, but I can not reproduce that problem. Closed Caption are display correctly. It's strange.

However, my ubuntu environments are Japanese preffered, may be 69-language-selector-*.conf will fix Flash problem.(IMHO, if you use English preffered settings, problem still exits).

So, just for testing, would you mind doing the test?
 1) `sudo ln -s /etc/fonts/conf.avail/69-language-selector-ja-jp.conf /etc/fonts/conf.d`
 2) `fc-cache -fv`
 3) re-check the flash contents.

Note: maybe, fontconfig problem still exist...

Revision history for this message
Andrew Hawkins (akai-kenshi) wrote :

@Yoshida-san:

Huh, that fixed the subtitle problem and removed the need for ttf-kochi-mincho. I didn't have '/etc/fonts/conf.avail/69-language-selector-ja-jp.conf' with Ubuntu 12.04 until now, though I followed all of the directions for Japanese localization here: http://www.ubuntulinux.jp/japanese

penalvch (penalvch)
no longer affects: language-selector (Ubuntu)
no longer affects: fontconfig (Ubuntu)
Revision history for this message
Fumihito YOSHIDA (hito) wrote :

@penalvch,

I wonder if it would be better to set language-selector / fontconfig. Probably, these are root cause.

Revision history for this message
penalvch (penalvch) wrote :

Not reproducible in Trusty.

Changed in flashplugin-nonfree (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
hendry (hendry-webc) wrote :

We had a similar problem in Webconverger and it was solved with ttf-xfree86-nonfree btw.

https://github.com/Webconverger/webc/issues/190

Revision history for this message
Rolf Leggewie (r0lf) wrote :

@Yoshida-san, can you please explain what you meant in #75?

gill (gillian-ha)
affects: ubuntu-translations → flash-install
Changed in flash-install:
assignee: nobody → gill (gillian-ha)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.