Multiple replacements of characters

Top  Previous  Next

User interface > Main menu > Menu: Help > Wizards > New project wizard > Multiple replacements of characters

 

By the character substitution wizard you can create projects, which replace a number of letters by other characters or literals. E.g. this can be necessary for the conversion of text files, which were written on another operating system.

 

A character substitution project is very similar to a word replacement project. However, you don't have to write the substitution list, since there is only a restricted set of characters. You simply can select for a character in the table another one from a list. Characters, for which no replacement is chosen, will be copied unchanged into the target text. Instead of selecting a replacement character in the right box, it is possible too, to write a literal replacement expression directly into the according field of the table. By this, the table is set into the edit mode.

 

Select a character in the table first. As soon, as you select a character from the right box, the text in the actual row of the table will be overwritten.

 

 

WizardMRChars_en

 

 

The content of the column: "Replace by ...", can be saved and reloaded later.

 

If in all rows of the table the desired assignements of characters are set and you have operated the confirming button by which the editing mood is exited, you get the text of a production displayed on the next page of the wizard. This production suffices for the whole character substitution project. For example the production for the conversion of an Atari text looks like:

 

(

   ""     {{ out << xState.str(-1) << "";}}

| ""     {{ out << xState.str(-1) << "";}}

| ""     {{ out << xState.str(-1) << "";}}

| ""     {{ out << xState.str(-1) << "";}}

| ""     {{ out << xState.str(-1) << "";}}

| ""     {{ out << xState.str(-1) << "";}}

| ""     {{ out << xState.str(-1) << "ü";}}

| ""     {{ out << xState.str(-1) << "ä";}}

| ""     {{ out << xState.str(-1) << "Ä";}}

| """     {{ out << xState.str(-1) << "ö";}}

| ""     {{ out << xState.str(-1) << "Ö";}}

| ""     {{ out << xState.str(-1) << "Ü";}}

| ""     {{ out << xState.str(-1) << "§";}}

| ""     {{ out << xState.str(-1) << "ß";}}

| SKIP     {{ out << xState.copy(); }}

)*

 

If you now finish the wizard, the project is ready for application.

 

In the directory:

 

..\TextTransformer\Examples\Wizards

 

there are two lists of characters:

 

ANSI2DOS.txt und DOS2ANSI.txt

 

by which you can create projects for the conversion between the ANSI character set and the DOS character set.



This page belongs to the TextTransformer Documentation

Home  Content  German