These notes may help some beginners of Unicode programming with FWH.
[b:28o7d1eo][size=150:28o7d1eo]FW_SetUnicode( .T. ):[/size:28o7d1eo][/b:28o7d1eo]
It is necessary to call this function at the beginning of the Main() function. In any case before any Window/Dialog is created and any screen I/O starts.
[b:28o7d1eo][size=150:28o7d1eo]KeyBoard:[/size:28o7d1eo][/b:28o7d1eo]
It is possible to use (a) Windows on-screen keyboards, (b) utilties like Google Input Tools or (c) Hardware KeyBoards. First ensure the keyboard works with Windows Notepad, Word, Excel, etc. If the keyboard works with Windows software, then it works with FWH application also.
[b:28o7d1eo][size=150:28o7d1eo]Unicode GETs and Length of Variables to use.[/size:28o7d1eo][/b:28o7d1eo]
It is very important to know that we need to use character variables with larger sizes to handle Unicode input.
Each single Unicode character requires about 3 bytes. That means we need to modify the DBF field widths and variable lengths in our Gets to almost 3 times or even more.
For example, our present ANSI application may be having a character field with width of 2 bytes. We can comfortably enter values like "NY", "OH", etc. But if we try to enter Unicode characters, we can not input even a single character. We need a space of atleast 6 bytes or even more.
[b:28o7d1eo][size=150:28o7d1eo]What do we mean by a single Unicode character?[/size:28o7d1eo][/b:28o7d1eo]
This is another important thing to understand. Some languages make one alphabet using more than one character. For example, this is a composite alphabet in my mother tongue. To see, it looks like one alphabet.
[size=200:28o7d1eo]క్ష్మ
[/size:28o7d1eo]
But this is made up of 4 Unicode characters, viz.
[b:28o7d1eo]K + SH + M + A (phonetically)[/b:28o7d1eo]
What appers like a single alphabet requires 4 Unicode characters and requires 4 x 3 = 12 bytes of storage. It is now clear that we can not input this alphabet in a variable or field of width less than 12 bytes. From this we can underestand how much field-sizes we need to provide to store Unicode data and what size of variables we should use in GETs.
This is some essential information to keep in mind, before we start working with a Unicode application.
↧