Why my Poseidon For Uml Garbled? - uml

I downloaded a Poseidon for UML 8 - Installer (Community Edition 8.0.0).
When I do exit operation or some other operations, I got code Garbled Dialog as:

It looks like you are running Windows is in a language (eg. Chinese) that is not supported by the software. Some dialogs like Yes/No dialogs and file open dialogs have translations for other languages but the font used in the software does not display the characters correctly so you just see empty boxes.
It should be easy to guess on most dialogs what they should say, in your example the buttons probably say Yes, No, Cancel.
You can change the language in Windows to English and it should work.

Related

MBCS File Menus generate ???? Characters

I am working on an MBCS app using MFC. I am trying to support Asian languages. For the purposes of this discussion, we'll say I'm trying to support Chinese. I am able to support Pop up dialogs via MessageBoxW and Dialog SCREENs by pasting Chinese characters directly into the RC file. I can't get file menus to work using either resource view or editing the RC file directly. Whenever I type in ANY Asian character, the screen shows ???. One ? for each character. I have tried modifying the menu in C++ using ModifyMenuW. I get more question marks. Visual Studio shows everything working, and the RC file is unicode (UTF-16). I can't easily convert my project to unicode mode. Spanish, French, and German all works fine (one of the Essets in German doesn't work, but that isn't a show stopper). What should I try next?
Thanks in advance!
Well, the easy answer would be change the application to Unicode, but this is not always simple, or possible at all.
Concerning using Unicode in a MBCS application, some things are possible and some others not. For example, I have made a MBCS application displaying and editing translations of program strings (messages, menues etc) in a ListView control, however ListView does have a specific message to turn it to Unicode (LVM_SETUNICODEFORMAT) and support operations (see also CCM_SETUNICODEFORMAT). Menus aren't controls though, but they do have "wide" (Unicode) functions.
If you want to use Unicode in your application, there are some tests you need to make. Success is not guaranteeded, but you can at least draw some conclusions and determine whether what you want to do is possible.
Test1:
You mentioned trying ModifyMenuW(), but this will try to modify an existing menu. Instead, try InsertMenuW() or InsertMenuItemW(). Any unicode string should be displayed properly, so try not just Chinese, but other laguages too (eg Greek or Russian). And btw, I can't see how French works and German doesn't (they use the same codepage - West European). What's the system codepage of your test-machine?
Test2: (if the above has failed)
Try changing the whole menu (SetMenu()) with having a single (unicode) menu item as its root.
Test3: (if the above have failed)
Then you need to check whether the window containing the menu must be Unicode. Create a simple "Hello World" Win32 application, or find a sample, if Visual Studio does not do this for you (these basically register the window class, create the main window and start the message-loop) - you must add a menu too, using the "wide" version of the menu functions explicitly. If this doesn't work, try changing the code that creates the window to unicode. This way you will know whether you need a unicode window, to own the menu.
Please make these tests and let us know the results. I will further post if needed.

Text corruption in LLVM 7.0.1 installer

I have tried install llvm 7.0.1 on Windows 10.
But the installer has text corruption like below.
It make so harder to install.
How do I fix it?
I using Windows 10 1809, chcp is 65001.
I using Japanese.
I have enabled "Use Unicode UTF-8 for worldwide language support" in Region settings".
Is this change cause of the error?
But A installer of other application does not be text curruption.
Update:
The Picture of installer with compatibility mode (Windows XP SP3)
That LLVM installer is not a Unicode NSIS installer. The LLVM team can fix it by adding Unicode True to their NSIS script.
That LLVM installer looks like it supports multiple languages (I could not find it's source, it might be using CMake/Ninja) and NSIS does try to guess the correct language but this is based on the return value of GetUserDefaultUILanguage() and not the active codepage.
I could not replicate your issue on build 18290 (after changing to UTF-8 and rebooting I verified that GetACP() returns 65001) but this is probably because my system is detected as English by NSIS.
Based on the (N) in your Next button in your screenshot I'm going to guess that your UI language is detected as Chinese or Japanese?
Without more information about your system it is hard to guess if this is a bug in NSIS or Windows. NSIS is a relatively normal application and does not call MultiByteToWideChar on its interface strings (IIRC).
Edit:
By forcing a installer to pick Japanese I can replicate your issue. The solution for this issue is to switch your "language for non-Unicode programs" back to Japanese if you wish to install this application using Japanese as the display language. Another solution you can try is to set the locale for a single application. AppLocale was Microsoft's solution to this but it is not supported on Windows 10 but there are other alternatives out there.
When building a NSIS installer without Unicode support the program stores the text internally as raw bytes encoded with the codepage of the specific language. At run time it uses functions like SetWindowTextA to set the text of UI elements. This is how non-Unicode applications have worked since the dawn of time on Windows. All non-Unicode programs that display text outside the ASCII range will have the same issue unless they have been specifically written to support UTF-8 as the active codepage (which is unlikely since it is a new feature). This feature is only useful for console applications and ported POSIX applications that assume that the narrow string is UTF-8 encoded.
Too long for a comment.
UPDATE: Looking at this a little, I am wondering if the problem is a font corruption issue. There is a description of rebuilding the font cache here: http://www.trishtech.com/2013/11/rebuild-fonts-cache-windows-8/. I think you must install a good copy of the font file first though? You do that by copying the font files into the Fonts folders I believe. I will check with Anders what font NSIS uses.
Similar issue with an MSI file: Windows Installer ugly font rendering.
Compatibility Mode: Pretty sure that UTF8-setting would cause it. I don't think it would work, but the first thing I would try would be to run the executable in compatibility mode.
Locate the setup.exe in question.
Right click the EXE, hold right mouse button down, now drag to empty desktop area and release mouse button. Click "Create Shortcut Here".
Right click Shortcut => Properties => Compatibilty tab.
Try various combinations of "Run program in compatibility mode for..."
I would try "Windows XP" highest service pack first. Click OK when done.
Now double click the shortcut to launch the executable and see what happens.

How should I create a desktop mockup?

I want to create a desktop mockup on Elementary OS 0.2. By "mockup" I mean something that shows off the aesthetic of the mockup, mostly just showing what selecting/clicking/hovering over a button or widget does to that particular part of the UI. I'm thinking about creating the various parts on GIMP and coding animation and transition logic into the final result. I know that something like this can be done in HTML/JS, but I want to avoid using those. Is there anything optimized for a project like this? I'm open to most languages.
Try WireframeSketcher wireframing tool. Unlike Gimp or PowerPoint, WireframeSketcher is designed specifically to help you create mockups and wireframes. It comes pre-packaged for Debian systems and can also be found in Software Center and so it works on Elementary OS too. Note that it's a commercial tool, but you can try it freely for 14 days.
Most PMs at large companies mock these things up using a presentation package like PowerPoint. If you know the routine and where to click it can look fantastic with minimal effort.
MockupUI does both wireframe and Windows native looking mockups. It uses your desktop's visual style which makes screens and widgets look as a standard Windows application. MockupUI lets you export screens as individual images, docx, pdf or html.
Actions/interactions can be explained by highlighting widgets and adding text annotations.

Linux, change text field behavior

I have an idea to write a program that modifies the behavior of text fields on Linux. What I want is that the program will automatically change the text entry language according to the textfield's text direction in all the system. For example, if I have English and Hebrew languages installed, and I click on a textfield in some software that normally outputs the text from right to left, than the program will automatically change the text entry language to Hebrew. If I click on a text field that outputs text from left to right, the program will switch the language to English.
I don't know much about system or UI programming on Linux, ( More experienced on Windows ) and I don't know where to start. Is there a way to register 'hooks' on GUI elements on Gnome and KDE? Maybe I should add this to Gnome and KDE's code?
I'd appreciate any hints as to how to start.
Many thanks,
Oded.
First some caveats:
Normally text field alignment for GUI windowing toolkits is either explicitly set by the program or is set based on the detected system locale (in Qt and GTK at least) either in relevant Text Object QLineEdit in Qt or GtkEntry in GTK or in the higher level Layout Object that contains them.
That said in order to implement the functionality at least for your own programs, you will need to identify a few things
GTK or Qt or both ? If you are implementing at base level (i.e not just bindings), then this also means C or C++ or both ?
GTK 2 or GTK 3, QT 3 or QT4 ?
Which text widgets on each GUI toolkit to you want to override ? Just the two I mentioned I above or any or all of the possible text widgets in either library ?
Do you want your behavior to work regardless of the locale set ? E.g If you have LTR locale set do you want right aligned text widgets to switch input method ?
What method of switching input method do you want to use ? SCIM, XIM, ibus or just immodule (in both its GTK and Qt forms) ? Do these input methods support being programatically changed ??
What happens if a user has 2 or more LTR languages installed or 2 more RTL languages installed ? Do they get to pick which language ? Is there current locale setting respected ?
Assuming you want to go down the immodule path
See the following resources for Qt
How to support input method in KDE/Qt application.
QInputMethodEvent Class Reference. You will want to implement this event, and the get Text widget's alignment using an alignment accessor, then set the Input Method based on alignment.
See the following resources for GTK
GtkIMContext
GtkIMContextSimple
GtkIMMulticontext
The general method is the same.
Implement the event handler for when text is typed into the widget but before it is displayed in the widget.
Switch the input method based on the widget's alignment property
Resources on learning GTK
GTK 3 Reference Manual
GTK 2 Reference Manual
Gnome Developer Centre
Resources on learning QT
QT Reference Documentation
Qt4 tutorial for absolute beginners
The Qt4 tutorial
From your comment, it seems you would be instead be writing your own InputMethod mechanism or modifying an existing one.
In order to have it loaded by default in Gnome and KDE programs not difficult to do, just set your input method based on locale association. The difficult part is having the InputMethod aware of location it is being typed into. Normally the InputMethod isn't aware of the calling application, let alone the GUI framework it is written in.
Resources on Input Methods
List of input methods for UNIX platforms
Linux input method framework brief summary
ibus
uim
scim

Windows CE 6 Wordpad replacement

I'm developing a Win CE 6 OS image and want to make it fit in the "Windows Embedded CE 6.0 Core Run-Time License".
This means, among other things, that I have to remove the Wordpad application.
From a product service and development perspective I'd like to replace it with something similar but free.
One thought was to do a simple editor in C#/CF.Net but I'd rather like to find something which can be plugged in and works, preferable free or at least cheaper than the 15$ per unit a bumped up license would cost.
Is there any suitably licensed text editors out there which are available for Win CE 6?
I don't need a rich text editor just a simple text editor to edit xml and text configuration files. The editor must be able to handle utf-8/unicode.
cke is quite good and I'm sure you can make some kind of a deal with it's author. CEdit is another good one.
I ended up writing my own simple file editor in C#/WinForms. Not great, but gets the job done.

Resources