PDA

View Full Version : Character conversion and .ti files



Pepe
9-Mar-2005, 02:36 PM
Hi all,

Running Linux with Dataflex 3.2 I need to solve the following problem.
We have .dat files and source code that were written in Unix using PC850
character sets. Now some of that stuff has to be shared in Linux using
ISO 8850-1 /15.

As a simple example of what we need is the following:

Everytime the "a" key is pressed I want to store in the .dat file a "g"
and everytime a "g" is read from the database I want to show a "b".

Pressing "a" gives us a decimal value of 97 wich in octal is 142
Pressing "b" gives us a decimal value of 98 wich in octal is 143
Pressing "g" gives us a decimal value of 103 wich in octal is 147

For that we created a new .ti file with the following:

[i\141]=0;\147, # the idea is that every input of an "a" should be
transformed into a "g"

[o\147]=0;\142, # visualizes every "g" as a "b". Thus the word
"gnome" would be visualized as "bnome"

Combining both of the above on a dataflex field is that if the user
presses an "a" a "g" will be actually stored and a "b" will be shown.

Somehow the [i\..] bit is not working and I dont know were we are going
wrong or even if that can be achieved.

Obviously the a-->g-->b mappings are an example.

Can that be achieved? How?

TIA

--
José Guimarães [ pg@moose-software.com ]
Director
Moose Software
http://www.moose-software.com

Pepe
9-Mar-2005, 03:03 PM
problem solved.

Wrong syntax for the [i...] portion

Thanks
--
José Guimarães [ pg@moose-software.com ]
Director
Moose Software
http://www.moose-software.com