Difference between revisions of "Translate Characters"

From TED Notepad
Line 12: Line 12:
 
Optionally, {{field|Translate Characters|Delete all other characters}} option can be used to delete all characters, which are not specified in the {{field|Translate Characters|Find}}. Note: Even if {{field|Translate Characters|Delete all other characters}} is turned on, the translation of characters still requires that every character from {{field|Translate Characters|Find}} has a corresponding character in {{field|Translate Characters|Translate to}}. If {{field|Translate Characters|Translate to}} is shorter than {{field|Translate Characters|Find}}, extra characters from {{field|Translate Characters|Find}} are again translated to ''nothing'', deleting them from the results as well.
 
Optionally, {{field|Translate Characters|Delete all other characters}} option can be used to delete all characters, which are not specified in the {{field|Translate Characters|Find}}. Note: Even if {{field|Translate Characters|Delete all other characters}} is turned on, the translation of characters still requires that every character from {{field|Translate Characters|Find}} has a corresponding character in {{field|Translate Characters|Translate to}}. If {{field|Translate Characters|Translate to}} is shorter than {{field|Translate Characters|Find}}, extra characters from {{field|Translate Characters|Find}} are again translated to ''nothing'', deleting them from the results as well.
  
Optionally, {{field|Translate Characters|Escapes & ranges}} option can be used to turn on recognization of character ranges within {{field|Translate Characters|Find}} and {{field|Translate Characters|Translate to}}. Character ranges allow to easily specify entire sets of characters, e.g. {{string|a-z}} or {{string|0-9}}. Note however, that using ranges has a few limitations/caveats. {{todo|Escapes & ranges}}
+
Optionally, {{field|Translate Characters|Escapes & ranges}} option can be used to turn on recognition of character ranges within {{field|Translate Characters|Find}} and {{field|Translate Characters|Translate to}}. Character ranges allow to easily specify entire sets of characters, e.g. {{string|a-z}} or {{string|0-9}}. Note however, that using ranges has a few limitations/caveats. {{todo|Escapes & ranges specifics}}
  
 
Note: Characters not specified in {{field|Translate Characters|Find}} are not modified, unless {{field|Translate Characters|Delete all other characters}} option is turned on.
 
Note: Characters not specified in {{field|Translate Characters|Find}} are not modified, unless {{field|Translate Characters|Delete all other characters}} option is turned on.
  
Note: This tool is always {{defined|case sensitive}}. You may need to specify translation for both {{defined|lower case}} and {{defined|upper case}} characters, if {{defined|case insensitiveness}} is expected.
+
Note: This tool is always {{defined|case sensitive}}. You need to specify translation for both {{defined|lower case}} and {{defined|upper case}} characters, if {{defined|case insensitiveness}} is expected.
  
 
{{example_start}}Example:
 
{{example_start}}Example:
Line 26: Line 26:
 
{{example_end}}
 
{{example_end}}
  
Note: {{feature|Translate Characters}} tool can have similar effect as, for example, {{feature|All Upper Case}} tool:
+
{{feature|Translate Characters}} tool can have similar effect as, for example, {{feature|All Upper Case}} tool:
  
 
{{example_start}}Result: (using {{field|Translate Characters|Find}}: {{string|a-z}} and {{field|Translate Characters|Translate to}}: {{string|A-Z}})
 
{{example_start}}Result: (using {{field|Translate Characters|Find}}: {{string|a-z}} and {{field|Translate Characters|Translate to}}: {{string|A-Z}})
 
{{example_body}}TED NOTEPAD FOR WINDOWS
 
{{example_body}}TED NOTEPAD FOR WINDOWS
 
{{example_end}}
 
{{example_end}}

Revision as of 20:31, 7 May 2011

This section is up to date for TED Notepad version 6.3.1.0.
Control page Control:feature:Translate Characters

Translate Characters.. (Alt+Ctrl+T)

Asks for Find and Translate to character maps. Then translates the characters in the selection by replacing all occurrences of each character from Find with corresponding character from Translate to.

Note that Find and Translate to represent lists of characters rather than entire phrases. By assigning the first character from Find to the first character from Translate to, the second character from Find to the second character from Translate to, etc., the tool creates a so called character translation map (similar to one used by Boy Scouts for substitution cipher encryption). With this translation map, individual characters of the selection are then substituted for other characters (as Boy Scouts are encrypting a secret message).

If Translate to is shorter than Find, extra characters from Find are translated to nothing, effectively deleting them from the results.

If Translate to is longer than Find, extra characters from Translate to are simply ignored.

Optionally, Delete all other characters option can be used to delete all characters, which are not specified in the Find. Note: Even if Delete all other characters is turned on, the translation of characters still requires that every character from Find has a corresponding character in Translate to. If Translate to is shorter than Find, extra characters from Find are again translated to nothing, deleting them from the results as well.

Optionally, Escapes & ranges option can be used to turn on recognition of character ranges within Find and Translate to. Character ranges allow to easily specify entire sets of characters, e.g. a-z or 0-9. Note however, that using ranges has a few limitations/caveats.

This section is incomplete and wants to be finished later.
TODO: Escapes & ranges specifics

Note: Characters not specified in Find are not modified, unless Delete all other characters option is turned on.

Note: This tool is always case sensitive. You need to specify translation for both lower case and upper case characters, if case insensitiveness is expected.

Example:
TED Notepad for Windows
Result: (using Find: EDNopadfWinws and Translate to: enmeorspparc.)
Ten meteors per parsec.

Translate Characters tool can have similar effect as, for example, All Upper Case tool:

Result: (using Find: a-z and Translate to: A-Z)
TED NOTEPAD FOR WINDOWS