Limited UNICODE support in QML

1,398 views
Skip to first unread message

David Skinner

unread,
Apr 15, 2014, 8:01:32 PM4/15/14
to go-...@googlegroups.com
First of all, I am new to go and new to QML so please do not make fun of me.

I recently began testing QML in go to determine if it was a suitable solution for me. I have a few observations about Unicode support that I may be misunderstanding.

I am using the Gardiner.ttf which supports Unicode in the Hieroglyphic range. So on my computer "ð“„¿" is a large bird heiroglyph. If you do not see a large bird then you do not have Gardiner.ttf on your system.

When editing go programs using sublime, the hieroglyph first showed up as a rectangle with the unicode value inside but now that I have the correct font, it now a bird in my programming code as well. I can use hieroglyphs in my documentation, in my unit tests and in my program output.

In my QML file I defined an ApplicationWindow with title: "𓄿 Senet 𓄿" and QML gave me an application window with a title that contained Hieroglyphic Unicode.
Later i created a MessageDialog with title: "𓄿 Senet - About 𓄿" and of course the title displayed perfectly. However, when I used the text: parameter, the unicode in the text did not display.

I then did a further test using a TextArea with a FontLoader {id: gFont name: "Gardiner" } set the font.Family: gFont.name and textFormat: text.RichText and tried printing some hieroglyphics. At this point I could see that it was using the correct font but for all of the Unicode characters, there were only rectangular boxes.

My conclusion is that anything that is a system window will enjoy Unicode support for the title but that Unicode is not supported for the text.

Is this an issue only on Qt5.2 or is this a go-qml issue? Is their any likely hood of future Unicode support for QML? Is there something simple that I have goofed up?

I am concerned about developing for an international market using a platform that does not support Unicode.. If you have had success using Unicode with QML please share!







Gustavo Niemeyer

unread,
Apr 15, 2014, 9:34:51 PM4/15/14
to David Skinner, Go QML
Hey David,

Can you mail me a self-contained example I could investigate?


--
You received this message because you are subscribed to the Google Groups "go-qml" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-qml+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

gustavo @ http://niemeyer.net

David Skinner

unread,
Apr 16, 2014, 12:55:57 AM4/16/14
to Gustavo Niemeyer, Go QML
I was going to try to enter it into the contest coming due in a couple of weeks. I have set up a repo at:
which is not complete and is not in good order but you should be able to find everything you need there. I will try to set up a proper stand alone test case there for you tomorrow afternoon.

Francisco Lopes

unread,
Apr 16, 2014, 1:28:04 AM4/16/14
to David Skinner, Go QML
Sorry, fowarding to the group:

Em Qua, Abr 16, 2014 em 2:25 , Francisco Lopes <obl...@gmail.com> escreveu:
I installed your font in my Ubuntu machine and loaded up your qml file with
qmlcene. I got the hieroglyphic characters displayed in main text area, and
I didn't had to configure anything (I'm using Qt 5.3).

It's worth to take a look at the Supported HTML Subset of QML RichText.
It supports meta tags, for example, you can have

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

and other stuff, this may make a difference, maybe.

Here's a screenshot: http://i.imgur.com/uBaSbYL.png

Em Qua, Abr 16, 2014 em 1:55 , David Skinner <skinne...@gmail.com> escreveu:
I was going to try to enter it into the contest coming due in a couple of weeks. I have set up a repo at:
which is not complete and is not in good order but you should be able to find everything you need there. I will try to set up a proper stand alone test case there for you tomorrow afternoon.
On Tue, Apr 15, 2014 at 8:34 PM, Gustavo Niemeyer <gus...@niemeyer.net> wrote:
Hey David,

Can you mail me a self-contained example I could investigate?
On Tue, Apr 15, 2014 at 9:01 PM, David Skinner <skinne...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "go-qml" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-qml+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

gustavo @ http://niemeyer.net

David Skinner

unread,
Apr 16, 2014, 1:58:26 AM4/16/14
to Francisco Lopes, Go QML
I have updated my repo so that you can compile and execute the qml file.

Thanks Francisco Lopes for running the test for me. I am on Debian sid with qt5.2 so something is not working on my end. I am very glad it looked good on your screen shot. Very encouraging.

Gustavo Niemeyer

unread,
Apr 16, 2014, 10:19:00 AM4/16/14
to David Skinner, Go QML
On Wed, Apr 16, 2014 at 1:55 AM, David Skinner <skinne...@gmail.com> wrote:
> I was going to try to enter it into the contest coming due in a couple of
> weeks. I have set up a repo at:
> github.com/davsk/senet

Oh, that's great news. Please note that the contest is due after this
weekend [1], though:

"All submissions should be made before the daylight of the Monday on
April 21st."

[1] http://blog.labix.org/2014/03/13/go-qml-contest

It's alright if the game is not polished. We'll be happy to take your
entry into account.

> which is not complete and is not in good order but you should be able to
> find everything you need there. I will try to set up a proper stand alone
> test case there for you tomorrow afternoon.

Sounds good. Francisco is able to run this on 5.3, so it shouldn't be
too hard to figure what's going on.


gustavo @ http://niemeyer.net

David Skinner

unread,
Apr 16, 2014, 7:05:40 PM4/16/14
to go-...@googlegroups.com
I have upgraded to QT5.3 beta and the qml file is now rendered properly by qmlscene.

Right now, the go program is still not rendering properly. Do you think it likely that this will change after May 7th with the release of the new QT5.3 packages?

Gustavo Niemeyer

unread,
Apr 16, 2014, 8:03:42 PM4/16/14
to David Skinner, Go QML
You mean the Go program is still not rendered properly, but with Qt <
5.2? If so, yes, there's a good chance it'll render properly with Qt
5.3. Note that you don't have to wait for testing it out.. should be
quite easy to get the qml package to build with 5.3 locally. Try to
just export PKG_CONFIG_PATH to point to the location of the .pc files
in the 5.3 installation.

David Skinner

unread,
Apr 18, 2014, 6:23:12 PM4/18/14
to go-...@googlegroups.com
Thanks for the advice, I would never have known to try it! I did:
    $ export PKG_CONFIG_PATH=/home/david/Qt5.3.0/5.3/gcc_64/lib/pkgconfig
    $ go build
    $ ./senet
   ./senet: symbol lookup error: ./senet: undefined symbol: _ZN7QString13toUtf8_helperERKS_

I have also cleaned up my code, commenting out the azul3d and steamworks stuff so if anyone wants to compile and test just the qml file and related go code, they won't have to spend hours tweaking their workspace to find out if their system supports full unicode.

Gustavo Niemeyer

unread,
Apr 18, 2014, 11:24:09 PM4/18/14
to David Skinner, Go QML
That error sounds like the senet application was built with 5.3, but
the qml package was built with 5.2. I suggest removing the $GOPATH/pkg
directory, just in case, and trying again.

David Skinner

unread,
Apr 22, 2014, 9:10:08 PM4/22/14
to Gustavo Niemeyer, Go QML
./senet: symbol lookup error: ./senet: undefined symbol: _ZN7QString13toUtf8_helperERKS_

Oh well. I think this is a Debian sid issue. Followed suggestion but got same results. I expect I will have full unicode support for QML after May 7 when I install the qt5.3 packages on sid. I have plenty of other stuff to work on in the meantime. At least I know that QML will have full unicode support in the future and I can feel free to use it for my project. Not like I was actually going to ship a product that quickly anyway.

I want to thank everyone who took time to help me with my problem. It means a lot when a product has good community support.

Gustavo Niemeyer

unread,
Apr 22, 2014, 11:07:08 PM4/22/14
to David Skinner, Go QML
Hi David,

The actual issue there is that despite building on 5.3, the
application is being run with the libraries from Qt 5.2. You can
verify the problem by running "ldd yourgobinary" and observing the
library paths.

To make it work, use something along the lines of:

export LD_LIBRARY_PATH=/path/to/qt-5.3/libraries

before running the Go binary.
Reply all
Reply to author
Forward
0 new messages