Roland
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
