TIP: Click on subject to list as thread! ANSI
echo: ms_word
to: ALL
from: CHRISTOPHER GREAVES
date: 1996-11-21 21:07:00
subject: character substitution

Here's another one I don't understand:
I have a table of 54 rows of substitutions. Column 1 lists text 
to find, column 2 lists text to replace. 
The substitution isn't working correctly.
The example:  I have " ug" in column 1 
              I have "úæg" in column 2.
(That's the "Hard Space" there followed by the "Greek Mu" 
character. I'm attempting to make MicroGrams look like MicroGrams 
should). 
The character string "20 ug" whose ascii codes are reported as 
50, 48, 32, 117, 103 ends up looking like this "2ø(ug" (aka two 
degrees parenthesis) whose codes are 50, 48, 160, 40, 103. 
The macro code reads:
        EditFind .Find = FindText$
        EditReplaceStyle .Style = MacName$
        EditReplace .Find = FindText$, .Replace = ReplaceText$, 
                            .ReplaceAll, .Format = 1
When I turn OFF the formatting (as in ... ReplaceAll, .Format = 
0) I get a Hard-space Parenthesis, with codes of 160, 40.
I suspect that somehow I'm back into that character-map quandry 
we composted a couple of weeks back.
My guess is that I could finish off my "TableSubstitute" macro 
with some customised Find/replace code that looks specifically 
for this string, and does very careful replacement, but I'd 
rather have the whole thing driven from this table, because then 
the users can nominate their own substitutions.
Thanks in advance for any hints, suggestions or tips.
                              Christopher.Greaves@WESTONIA.com
 * 1st 2.00b #6263 *  People and Computers
--- PCBoard (R) v15.3/25
---------------
* Origin: Westonia Computer Systems 1:250/636 (416)241-1981 (1:3615/51)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.