open-power / petitboot

GNU General Public License v2.0
205 stars 56 forks source link

Some characters can not show in Petitboot Language Selection page #9

Open deathscytheh28 opened 8 years ago

deathscytheh28 commented 8 years ago

Please refer to the attached picture pic1

sammj commented 8 years ago

This is most likely a case of your build missing the necessary locales. If you're using op-build, have you added the correct locales under the toolchain options?

deathscytheh28 commented 8 years ago

To clarify it, the characters can show on console output, but cannot on VGA output.

The following pic is the console output. 3

jk-ozlabs commented 8 years ago

The VGA console issue would be related to the kernel tty driver, rather than petitboot here. We'll need to make sure that it has appropriate support for unicode characters. I'm not sure what the Linux vt support for that is like, and/or whether we have the appropriate glyphs for non-ASCII characters.

[Also, for the serial session: you'll get better output if you enable utf-8 line-drawing characters in your PuTTY config]

jk-ozlabs commented 8 years ago

... and, after a little reading, I don't think we have any facility for using a full unicode font in the local (VGA) tty.

deathscytheh28 commented 8 years ago

Hi Jeremy,

Thanks for your reply, do you have a plan to fix it?

alvintpwang commented 8 years ago

If we don't have any facility for using a full unicode font in the local (VGA) tty. Could we disable the multiple language function in VGA console? In other word, petitboot only supports multiple language in serial console.

sammj commented 8 years ago

I don't see a reason to disable multiple languages completely, as from the screenshot above it appears several other languages are still able to display. If the issue w.r.t the VGA console is what I think it is, we could potentially look at selectively turning off options for some languages.

deathscytheh28 commented 8 years ago

Hi Sam, It make sense, would you help to fix it?

sammj commented 5 years ago

Adding some extra information to this issue: the main problem is that when using the VGA interface the Petitboot environment is responsible for rendering unicode fonts, as opposed to IPMI/serial where the user's machine does the work. This requires a) including the fonts in the Petitboot image, and b) using something like fbterm to render them properly. As a proof of concept this all works however in op-build this takes us over our 16MB size limit by a fair margin. Optimising and/or allowing more space to be used is being worked on, largely as a part of or depending on https://github.com/open-power/op-build/issues/2167.

lili-lilili commented 3 years ago

Hi sammj: I am the fw developer of IPS, and our products currently require Chinese display. Is there any new progress on this issue? Or can you provide specific modification methods?

klauskiwi commented 3 years ago

Looking for some information around "showing chinese / japanese characters in Linux console" I found a concerning documentation from Linux-from-scratch that says Linux does not support this - http://www.linuxfromscratch.org/lfs/view/stable/chapter09/usage.html

I wonder if enabling fb console and using an appropriate font can solve this or not

oldherl commented 4 months ago

Actually Linux console DOES support displaying Chinese or Japanese characters. The only limitation is that each font can only contain up to 512 different glyphs, and only one font can be used in the same screen.

If you use a script to extract all the characters used in the Chinese translation, and (if the total count of distinct characters + 96 visible ASCII character <= 512) generate a small subset font for it, it would work.

You can make 5 fonts: one for each of zh_CN, zh_TW, ja and ko, and one for everything else (plus the language names). Each one should contain <=512 characters.