Normal Topic [Solved] Replace wierd seperator (Read 352 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
[Solved] Replace wierd seperator
Oct 8th, 2007 at 2:35pm
Print Post Print Post  
Solution: Use @Asc() to determine the ascii value of the strange character.

I am trying to replace a separator that looks like a up carrot and a pipe.

The up carrot and a pipe behave as 1 character not 2. I originally thought it was @chr(94)+@chr(124) strung together but it is 1 character that looks like the 2 together.

Can someone tell me what it is? When I try to cut and paste them into this message (so you could see it) it behaves like a tab. I tried replacing str2 = @replace(DataConverter, "@chr(9)", ";") thinking it might be a tab, however that did not work either.

Thoughts?

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Replace wierd seperator
Reply #1 - Oct 8th, 2007 at 2:47pm
Print Post Print Post  
The carat often represents Ctrl. So, Ctrl+G might look like ^G. It might be Ctrl-I, which would make a tab.

Try this:
WriteLn(@Asc("[paste weird character here]"))

See what number it gives you.

Also, if you want to replace a tab, you need to get rid of some quotes in your program.

@replace(DataConverter, "@chr(9)", ";")

Should be

@replace(DataConverter, @chr(9), ";")
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Replace wierd seperator
Reply #2 - Oct 8th, 2007 at 3:03pm
Print Post Print Post  
Thanks Erika!


I had not thought to use @ASC.

I just added a command button to my utilities application with WriteLn(@Asc(Dataconverter))

Now whenever I need to figure out what a character is I just paste it into my Dataconverter box and press my Identify command button.

The extra quotes in my example were just a typo

Thanks again and you can mark another one solved.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged