I've been testing typing inside textInput components with the Windows Japanese IME turned on. All works well out of the box, which is awesome. One (fairly specific) question I have, though, is about typing numbers. It seems from my limited experience that numbers typed in default to Zenkaku (2 bytes) which don't seem to be accepted by the textinput as committed values. One can switch to Hankaku (1 Byte) notation by pressing F10 and the commit works. My question is about what's acceptable to a user. From my uninformed standpoint it seems like having to press F10 would be super annoying for a user and thus either the textInput should accept Zenkaku values or it should default to typing Hankaku (both of which I assume may be possible with a little bit of code on focusIn or ValueCommitted). But then again, it could very well be that this is in fact the standard behavior for most web apps in Japanese and thus not annoying at all. In fact, there may be a great reason for why Zenkaku happens by default.
Would love to hear any thoughts from anyone who has dealt with localizing to Japanese, or any advice on web resources where an answer to such a question could be found.
thank you
f
I'm a Japanese web-app developer, without no skills about adobe flex. Sorry for non-flex-specific answer.
Most Japanese Windows users can switch IME on/off with "半角/全角" key. (Macintosh : "かな" key & "英数" key) It's easier than pressing F10 after typing numbers. With announcement to type numbers in Hankaku, such as "半角で入力して下さい", most Japanese users will type in Hankaku.
Other methods
Switch off IME with CSS (works only in MS-InternetExplorer.)
// IE6
ime-mode: disabled;
// IE8
-ms-ime-mode: disabled;
Convert Zenkaku numbers to Hankaku automatically.
Related
I have searched for a setting within the mvbasic extension within VSCode but I may have hit a dead end. I am new to using VSCode with the rocket mvbasic extension and still in the learning process, so please bear with me.
Our development for the most part has always been directly on the server using the editor within it to code and develop on a Unix/Aix platform with Unidata. Some of our code has array assignments with CHAR(253)/CHAR(254) characters within them. See the link to the image that shows how its done. Now I didn't do this code, the original software developer did this many many years ago and we just aren't going to go and change it all.
How code looks on actual server
The issue is when pulling the code to edit in VSCode, the extension is changing it, and I uploaded it back and didn't pay attention and it was implemented in our production incorrectly, which created a few bugs.
ALIST="H�V�P�R�M�D"
How code looks in VSCode
How code looks after uploaded back to server from VSCode
Easy to fix, no biggie, but now to my question.
Does anyone have this issue, or has a direction to point me into that maybe I need to create a setting to keep the characters in the correct ASCII format so that this doesn't happen again by mistake?
VSCode defaults to the sane choice for character encoding in 2022: utf-8, but sometimes you have to deal with legacy stuff.
https://code.visualstudio.com/docs/editor/codebasics#_file-encoding-support
If you click on the UTF-8 in the bottom right corner you can choose "Reopen with Encoding":
After that, you can select a different encoding. I chose DOS (CP437) at a guess and literal MV characters are displayed as superscript 2 (²), and for me I can save to the server and confirm those characters remain as #VM after a round trip (though for my terminal emulator they appear as } which is useful).
You can edit preferences and set "files.encoding": "cp437". One other thing that can be helpful if your programs don't have a standard extension (like .bas) as most don't is to set the default mode to basic so most of what you're editing will identify as MVbasic, and you can do a quick CTRL-K M to switch to any other modes if you're just pasting in something else like SQL.
Some useful links - the Rocket forums are helpful and the folks there are always super nice
https://community.rocketsoftware.com/forums/multivalue?CommunityKey=521bce2e-71d5-4d32-b560-dfa95e950eb5
The MV Extensions Community extension is a good group and always has been helpful when I've had issues. I've made some small contributions - they're very open. I prefer this extension, but honestly haven't done a deep comparison.
https://github.com/mvextensions
For some reason, my mod key no longer activates any of the key bindings and I can't use the shortcuts.
I use gentoo, use vi + tmux + urxvt. I have tmux mapped to Ctrl + a. I'd been using the default mod key (windows logo) to activate awesome. I have an rc.lua file that I configure under .config/awesome, and it hasn't changed during updates. This has been running fine.
When running xev, and pressing the mod key, no events appear at all. Yet the keyboard and all keys work fine on another machine.
Anyone have thoughts why the mod key isn't triggering anything?
(note: this answer belongs more to superuser.com rather than stackoverflow.com)
There is multiple ways this can happen. One of them is changing the keyboard layout "the wrong way". However, the most likely (and facepalm) way it happens is that some keyboards manufacturer consider this a feature.
If you have a Logitech or other brands of gaming keyboards, they usually have a little switch to disable the windows key to prevent accidental hits from the palm of your hand when pressing w/a/s/d. Maybe you hit that switch by mistake?
Another way is that you mapped Super_L to a keybinding, but I guess you would have noticed this.
So I need to now how safe the QLineedit is for inputting passwords. I made a simple window with a single lineedit set into password echo mode. Let's say I types some word there. Now I need to somehow grab this word from the program's memory and monitor it (for wxample to see if it's still there after I cleared the edit or typed another word). However when I used the mmory inspectors like CheatEngine or GameConqueror their outputs didn't have this word. (And when I set the some internal variable in the program it was in both outputs allright)
Am I doing something wrong or does it mean that QLineEdit is secure?
It is not secure, and it's not meant to be.
The data is there and also extremely easy to reach (you're probably not seeing it because of the UTF-16 encoding, but just try GammaRay against any Qt application and you'll see marvels).
I'm also wondering about your definition of "secure". Like anything else in computing: if you let an attacker get too close, you'll lose. End of the story.
If you're fighting against an attacker with capabilities of inspect your application's memory, there's almost nothing you can do to prevent them to eavesdrop to anything that goes on in your application, including processing the individual keypresses when you type the password.
I've started using GPS for coding Ada at work - does anyone have any tips for getting the best out of the IDE? or any plugins I should be aware of?
For example is there a way to enable on the fly syntax/type checking - of the sorts you get in eclipse/visual studio where errors are underlined as you go?
Also what are people's general opinions on GNAT Workbench compared to GPS?
thanks
Matt
The GPS does not have a from of background syntax checking and that is by design. The idea behind GPS is that it is the compiler who decides what code is correct and what code is not correct. It means that if you want to know if your code is correct or not you have to compile it. On a Windows computer the short cut key for that is SHIFT+F4 and will only compile the specification or body file you are currently editing. Pressing F4 will compile your whole project. You will save time by using SHIFT+F4.
Another interesting feature is that the GPS uses cross-reference (XREF) information when navigation through the code. For example, let's say you would like to find all the places in your code where a specific subprogram is called. In GPS (GNAT PRO), right click on the subprogram you are interested in a press Find references. In the GPS GNAT Libre version you don't have a menu when right clicking in your code. In this case go to the Navigate menu and click on Find references there. If the GPS does not find any references and you know that the subprogram is used in the application it means that the XREF information needs to be updated. You may compile the whole application by F4 since the XREF information will be generated along with the binary that is produced. If you go to Edit and click on Key shortcuts you can set up a short cut key to generate the XREF information only. You may also find several interesting features there that you can set up a short cut key for.
The cross-reference information (XREF) is also used for refactoring (GNAT PRO specific functionality). It often works well for changing variable and subprogram names. Just make sure the cross-reference information is up to date!
Code snippets in GPS are also useful. You use them by writing a keyword followed by CTRL+O (not zero, O as in Orwell). To see the code snippets you can choose between go to Edit and click on Aliases. You can also create your own Aliases and code snippets to become a more productive Ada Software Engineer.
Good luck!
I do not think that GPS has a form of background syntax checking like Eclipse does, at least I haven't found it.
I wrote a small sized terminal program in GPS as my first Ada program and my opinion of it is generally negative.
The browser is very confusing and it is hard to find items you are looking for.
The editor has the nasty habit of adding a column to the left and removing it dynamically based on the item under your mouse. What that does is when you are trying to select text with the mouse, your text switches right and left by one character as you move which makes precise selection a difficult thing to do
Getting in the debugger involves too many steps and it generally moves your files in the editor to the EOF position when you set breakpoints, so you will do a lot of scrolling to go back to the sections of interest.
The debugger output looks fancy with all the graphical elements but it is also cumbersome to operate.
GPS offers better help features for Ada libraries though, it's generally easier to browse the standard libraries and check them out than in Eclipse.
All in all, if Eclipse works for you, you might want to stick with it or perhaps open both on the same project and switch to GPS for things like help etc.
I had a related question out here which is on hold now (as I expect your question will soon be due to it's broad content) but I did some research and I am generally dissatisfied with what is out there in the Ada field. The language is great but it suffocates under bad tools.
One last tip: You might want to try Slick Edit as it's text editor and browsing features are quite good, although they too have flaws with Ada (for instance the beautifier).
Good luck with your venture
I was learning flex for a few days now and suddenly noticed that input of unicode / foreign characters on Linux into TextInput, TextArea or RichTextEditor gives you unreadable text composed of several characters (seems like utf-8 is making things bad). On the other hand, output is flawless.
I was trying hard to find anything for the same issue on the internet, but only this old blog entry could be seen. Author produced temporary solution but it is not sufficient.
So if Windows allows unicode and Linux doesn't, what should I do? Maybe the problem is on my machine only? Did anybody come up with the same problem and maybe the solution?
I have Adobe Flash 10.0.32.18 installed on my Sabayon Linux box.
Might have something to do with this bug:
Incorrect unicode input in linux
Which, apparently, will get fixed once FP 10.1 is released.
Just to further update the answer. Flex 4 components support unicode and the unicode characters can be typed into input controls using Google Chrome, Firefox 3.6+ and IE7+ .
For Java MySQL users
database.url=jdbc:mysql://localhost:3306/sampledb?useUnicode=true&characterEncoding=utf-8
To allow utf8 data-write operations.
Database table and columns must be set to utf8_* encoding to make sure the unicode data can be stored in the tables.