August 1, 2014 at 5:13 am #778
Greetings to Andrew and the rest of suneido community,
I am located in Southeast Asia and recently I have spent quite some time playing around with suneido development environment for a possible project. I must say that the development environment (so much the whole concept behind of it) is very impressive. It is very close to what I was looking for as an alternative to another proprietary ERP system that I have been working on for nearly 10 years.
While I was trying to play around with suneido environment, I found there is a small issue related to asian text displaying, particularly on browse control. Currently, I use Thai language to store and display texts. What I did :
1) Knowing that suneido is not unicode compatible, I changed the windows language as ‘Thai’ for non-unicode program support under Windows –>Region & Language –> Administrative –> Language for non-Unicode programs. I am using Windows 7 Ultimate (64bit).
2) I exceuted Suneido.Language = #(name: “thai”, charset: “THAI”, dict: “th_TH”). The Thai language charset is available in standard CHARSET object.
3) I then created a table, a card form(Access control) base on the table and a list form(Browse control) based on the same table.
4) I input some Thai language texts in the field on Access control. Everything works fine for both input and output.
5) But when I run the list form(browse control), the same Thai language text is displayed as some kind of messed strings in uneditable mode. But as soon as I try to edit the text in editable mode, it displays it correctly with original texts.
I tried to dig into the browse control and find out what can be done to correct it but no luck. I also tried to compare the way how Access control is displaying texts in order to correct the browse control but no luck either. I must admit that i have no experience with C++.
Could anybody here give a hand on this? I have attached some screenshots to better explain the situation.
Again, impressive work to suneido and keep up the great work 😉
JaskaAugust 3, 2014 at 2:01 pm #1061
I have found something more interesting.
If I change the Windows OS language code page setup to be Chinese or Korean in the same way I did for Thai, this problem does not exist. Both access and browse controls worked fine. What is interesting is that all of them are typical unicode languages but Thai behaves differently than the other two in suneido client.
The code in suneido that initializes data for browse is called “.list.set(data)”. Unfortunately, I couldn’t go any further as the behavior seems to be defined in c++.
I tried to hard code a specific font for certain columns. But it brings up other compatibility issues.
Does anybody have any suggestion what could be done next?
Thanks a lotAugust 5, 2014 at 3:05 pm #1062
For those who might find it useful, it turned out to be a specific font issue. The problem is resolved by changing the font name in class “StdFonts” which is used during runtime.
return OSVersion() < OSVersion.VISTA ? "Tahoma" : "AngsanaUPC"
Since I am using Windows 7 (64bit), “AngsanaUPC” is what is returned and used. But this change also affects everything else across the whole interface which is not what I want. They are still readable but barely. Could I define font per column?August 6, 2014 at 6:18 am #1063
I was a bit confused with the way how font is specified for field and that took quite a while to figure it out. The final solution is
adding the following font definition into field format
Format: (Text, width: 20,font: #(name: "AngsanaUPC", size: 11))
I assume it will affect everywhere this field is being shown. Still, I haven’t found a way to defined font per column.
It would be a lot better to use some sort of UI tool to simply this kind of things.August 11, 2014 at 7:37 pm #1064j_fergusonModerator
You should be able to define a class with the column name in the name like this
and the definition can look like this:
Field_string // or whatever datadict definition you want to inherit from
Format: (Text ….)
}August 12, 2014 at 12:07 pm #1065
j_ferguson: Thanks for your suggestions, that’s what I eventually discovered.
The minor issue with this approach is that it changes the font of that field universally. The initial problem only existed on browse control. Everywhere else, it was as good as it could be. After making this change, while it fixed the browse displaying issue, it also changed the default font in all other places which is not as nice as it use to be. Not such a big deal and I guess i can live with it.
Thanks for your help indeed.August 14, 2014 at 4:24 pm #1066amckinlayKeymaster
BrowseControl (actually ListControl that it inherits from) displays columns using code related to the report code. (It’s not in the C++ code – all the GUI code is in stdlib.) So one thing to try would be to check whether reports show the text properly. The related code is in TextFormat.
I can not think of any “easy” way to change the font just for Browse. This would need to be handled in the report / format code.
Sorry for the problems. Because we only use English, the foreign language support is not as well tested. It has mostly been developed and debugged by other contributors.August 15, 2014 at 12:52 am #1067
Hi Andrew, j_ferguson
Thanks for your help. In my experience working with other non-Unicode program which is used in different countries, there were still issues related to Asian language support even after 30 years since it was born. It is often not on the application level but OS code page setup and font design level. Sometimes, it is limited to what one can do on the application level(unless enabling unicode support, but it’s not what I want as it does what what i need). So I am kind of prepared.
I am surprised how far suneido has got in terms of Asian language support in my first attempt.
So far, it does everything I need.
No complaints at all :).
- You must be logged in to reply to this topic.