Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Issue With Korean translation of Upp Linux application (Does not render Korean text properly -- shows only squares)
Issue With Korean translation of Upp Linux application [message #45196] Wed, 30 September 2015 01:41 Go to next message
jfranks is currently offline  jfranks
Messages: 36
Registered: September 2014
Location: Houston, Texas
Member
Hello,

We are having difficulty with our app displaying Korean characters.
We have followed the directions given here to others:

http://www.ultimatepp.org/forums/index.php?t=msg&goto=43 537&

We did a copy/paste of the Korean text into t file using Theide editor.
Initially, it looks like squares before Upp compilation.
The build succeeds and Upp changes the text in the t file to hex numbers.
However, these don't render as Korean text in the application but continue to look like squares.
A screen image is captured as an example.
It is attached along with the t file for this project in tar.gz format.

The t file line numbers of the four text in buttons are
line #7773, #7787, #7419, and #7808.

We used Google translate to go from English --> Korean.
For example: "Update vT Software" gets translated to "업데이트 VT 소프트웨어"

It is those Korean characters that we copy/paste into Theide for further conversion to the hex number sequences.
However, all we get from Upp rendering in our application is square boxes.

T file encodings and font in Upp are default utf8 and Monospace.

P.S. Copy/paste of the same Google translated Korean text into Leafpad editor renders proper Korean text, and not squares.

Additional Context:
- Host: is Linux Mint 17.2 on Intel architecture
- Upp: we are using upp-x11-src-8760 snap-shot

Any suggestion regarding this is very much appreciated.
--Jeff
Re: Issue With Korean translation of Upp Linux application [message #45395 is a reply to message #45196] Sat, 07 November 2015 10:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Appears to be a font problem. In Win32, it works.

CJK characters are handled by "replacement fonts". Unfortunatly, identifying which fonts contain which characters is very slow process, so U++ has fixed font tables to accelerate this (in Draw/FontCR.cpp).

We will need to add some typical Linux fonts that support Korean. I have identified these fonts in my distro (Mint) to support Korean:

"WenQuanYi Micro Hei Mono"
"NanumMyeongjo"
"NanumGothic"
"WenQuanYi Micro Hei",

- that fixed problem for me. Anyway, you might want to run this simple utility to eventually find more fonts in your distro that support Korean:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
	ArrayCtrl a;
	a.AddColumn();
	for(int i = 0; i < Font::GetFaceCount(); i++) {
		DDUMP(Font::GetFaceName(i));
		a.Add(AttrText(String().Cat() << AsString(i) << ' ' <<
		               Font::GetFaceName(i) << " 업데이트 VT 소프트웨어")
		               .SetFont(Font(i, StdFont().GetHeight())));
	}
	TopWindow w;
	w.Add(a.SizePos());
	w.Run();
}


Then, there are bitfield maps in FontCR. You can use uppbox/FontMaps to generate them... (also, it is a nice demonstration why we need these fixed maps - it is pretty slow Smile

Re: Issue With Korean translation of Upp Linux application [message #45476 is a reply to message #45395] Sun, 22 November 2015 05:48 Go to previous messageGo to next message
jfranks is currently offline  jfranks
Messages: 36
Registered: September 2014
Location: Houston, Texas
Member
Mirek,

Thank you for responding to the question and the investigative work you did.

You said: "...We will need to add some typical Linux fonts that support Korean."
Is there a time table for this to happen?
Will it be announced as a release or will it show up in a nightly snap shot?

If this were available, we would like to make use of it since we have a need for this in our project.

Again, thank you for your help.

-- Jeff
Re: Issue With Korean translation of Upp Linux application [message #45477 is a reply to message #45476] Sun, 22 November 2015 06:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
It is in trunk (and thus in nightly build). Anyway, I have added fonts I have on my distro, so if the problem is not fixed for you (unlikely), my previous message contains intructions how to fix it.

Mirek
Re: Issue With Korean translation of Upp Linux application [message #45508 is a reply to message #45477] Wed, 25 November 2015 15:57 Go to previous messageGo to next message
jfranks is currently offline  jfranks
Messages: 36
Registered: September 2014
Location: Houston, Texas
Member
Yes, that fixes the Korean character rendering.

Thank you for the solution to this.

We are so ecstatic about this!

And then I was asked: "Can this solution can be back-ported
into upp-2007.1 ?"

I told them I would look at the code and see.
There does not seem to be a list of language character
fonts in upp-2007.1 and so I don't know how to do that.

Is there a way that we can back-port the functionality
for rendering Korean characters into upp-2007.1 ?

-- Jeff


Re: Issue With Korean translation of Upp Linux application [message #45509 is a reply to message #45508] Thu, 26 November 2015 09:03 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
jfranks wrote on Wed, 25 November 2015 15:57
Yes, that fixes the Korean character rendering.

Thank you for the solution to this.

We are so ecstatic about this!

And then I was asked: "Can this solution can be back-ported
into upp-2007.1 ?"

I told them I would look at the code and see.
There does not seem to be a list of language character
fonts in upp-2007.1 and so I don't know how to do that.

Is there a way that we can back-port the functionality
for rendering Korean characters into upp-2007.1 ?

-- Jeff




Unlikely. Why would you want to do such thing?

Mirek
Previous Topic: message.t file processed by other text editor
Next Topic: Wrong handling of Combined Unicode Characters
Goto Forum:
  


Current Time: Fri Apr 19 17:43:51 CEST 2024

Total time taken to generate the page: 0.02280 seconds