The source of the text string was witango on OS X. It wrote a file to disk. The app I was writing reads that file and parses. I was attempting a logic in that parsing that found one string and then went and subtracted that from the parent string to get a step toward the second string. It should have taken a few minutes to get that step to work, but the <@replace> wouldn't cooperate. It's one of those cases where I keep going back to see what it is that I'm doing wrong because I'm obeying the rules. Minutes turn to hours.... and then the light goes on... it's not me.
Since the FINDSTR came from the original string, and it was created by witango on OS X, the macroman theory would have to detect in which step of processing - from the original input to writing the file and reading it, etc., the change was made from one character set to another.
On Friday, July 25, 2003, at 05:41 AM, Dan Stein wrote:
Ronald,
Please keep us all informed.
on 7/24/03 21:30, Witango Customer Support at [EMAIL PROTECTED] wrote:
Roland,
Can you try the following code:
<@ASSIGN request$mystring "The quick brown fox jumps over the lazy dog.">
<@ASSIGN request$myStr1 "<@SUBSTRING STR='<@VAR request$mystring>' START='11' NUMCHARS='5'>">
<@ASSIGN request$myStr2 "red-brown and white">
<@ASSIGN request$EmptyStr "">
Original String:<@VAR request$mystring><br>
Str1:[<@VAR request$myStr1>]<br>
Str2:[<@VAR request$myStr2>]<br>
<br>
Paint the Fox<br>
<@REPLACE STR="<@VAR request$mystring>" FINDSTR="<@VAR request$myStr1>" REPLACESTR="<@VAR request$myStr2>"><br><br>
Clean the Fox<br>
<@REPLACE STR="<@VAR request$mystring>" FINDSTR="<@VAR request$myStr2>" REPLACESTR="<@VAR request$myStr1>"><br><br>
Colourless Fox<br>
<@REPLACE STR="<@VAR request$mystring>" FINDSTR="<@VAR request$myStr1>" REPLACESTR="<@VAR request$EmptyStr>"><br><br>
Do you get this result:
Original String:The quick brown fox jumps over the lazy dog.
Str1:[brown]
Str2:[red-brown and white]
Paint the Fox
The quick red-brown and white fox jumps over the lazy dog.
Clean the Fox
The quick brown fox jumps over the lazy dog.
Colourless Fox
The quick fox jumps over the lazy dog.
If you do not get the same results can you use this code to produce a test case which highlights your problem and send it to us off-list.
Following on from what Ben suggested, one area where you may find issues with @replace is on OS X. ?With the change to OS X Apple changed the character encoding of the OS so the witango server uses the standard Latin-1 character encoding of OS X while T2K used the MacRoman encoding of OS 9. ?If the string you are searching was encoded as MacRoman or came from a datasource that has had data inserted as MacRoman the characters may not match if they are above ascii 127. ?This would appear as a problem with @REPLACE when in fact it is an issue with the data. ?Look at some of your strings in an editor and look for byte values above 127. ?You should then be able to determine what the strings encoding was.
Witango Customer Support
??
On 25/7/03 10:26 AM, "Roland Dumas" <[EMAIL PROTECTED]> wrote:
> tried that
>
> On Thursday, July 24, 2003, at 05:12 PM, Dan Stein wrote:
>
>> Just a shot in the dark but try doing it with <@Variable
>> Name="request$myString" ?etc. I have seen problems with the @@ short ?
>> cu some
>> places.
>>
>> on 7/24/03 19:27, Roland Dumas at [EMAIL PROTECTED] wrote:
>>
>>>
>>> On Thursday, July 24, 2003, at 04:02 PM, Ben Johansen wrote:
>>>
>>>> Well, I has seen issues where a space was encoded as a hard-space
>>>> (255) and not (32).
>>>>
>>>> So you looke at it in debug and you are scratching your head.
>>>>
>>>> “Hi There” doesn’t match “Hi There”
>>>>
>>>> It kind depends on what wrote the file in the first place
>>>>
>>>> Like coping and pasting from a webpage can have some unexpected
>>>> pitfalls
>>>>
>>>>
>>>
>>> there's something like that. Problem is that witango is the source of
>>> everything, but when it grabs a string for a variable, it may or may
>>> not keep it the same. I grab a large piece and get a smaller piece ?
>>> with
>>> @substring. I turn it into a variable. later on, I want the larger
>>> piece without the substring, so I try to replace it with nothing. At
>>> that point, the substring that I variablized is not a match for
>>> anything in the larger string that it came from. Go figure.
>>>
>>> ______________________________________________________________________
>>> __
>>> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
>>
>> --
>> Dan Stein
>> Digital Software Solutions
>> 799 Evergreen Circle
>> Telford PA 18969
>> Land: 215-799-0192
>> Mobile: 610-256-2843
>> Fax 413-410-9682
>> FMP, WiTango, EDI,SQL 2000
>> [EMAIL PROTECTED]
>> www.dss-db.com
>>
>>
>> _______________________________________________________________________
>> _
>> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
>>
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
--
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Mobile: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000
[EMAIL PROTECTED]
www.dss-db.com
