MichaelGallagher

Multiple 'Pipe' character types?

Discussion created by MichaelGallagher on Sep 6, 2017
Latest reply on Sep 7, 2017 by philmodjunk

I use Pipe (vertical bars) to pass script parameters.  After many years of use, I've now come across a problem with use of pipes in scripts that leads me to believe there are two varieties of pipes.

 

Some pipes cannot be located with the Position (text; match; occurrence) function.  An example follows.  You'll notice that the strings are identical.  But the pipes within them were produced by different schemes.

 

Well behaved Pipes

/HD/Users/anna/Desktop/|XCT645656|Smith|KB395|Res|43|.pdf

... in this string I can successfully locate Pipes 1 and 6 with the Position (text; match; occurrence) function

These Pipes were produced additively, eg String = "|" & FieldA & "|" & FieldB & "|" & etc

 

The Problem Pipes

/HD/Users/anna/Desktop/|XCT645656|Smith|KB395|Res|43|.pdf

... in this string I cannot locate Pipes 1 and 6 with the Position (text; match; occurrence) function

These Pipes were produced by substitution, eg Substitute (String; "_"; "|")

 

So I'm thinking this is an encoding difference, but could use some suggestions in figuring it out as I don't know much about UTF-8/16.

 

In both of the above instances I have typed the Pipe as Shift-Vertical Bar on a mac keyboard within the script or function.

Outcomes