Readln character set being changed

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Readln character set being changed

Post by kpassaur » Thu Nov 20, 2008 2:05 pm

I have a text file and on line 23 it has the following text

VOUCHERNUMBE — INVOICEDATE ‘ INVOICENO. ‘ INVOICEAMOUNT “DISCOUNTAMOUNT’ NETAMOUNT;0]

and it displays just like shown above only on one line.

When I use readln it returns the following:

VOUCHERNUMBE â€â€

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Nov 20, 2008 2:13 pm

Which version of Macro Scheduler is this with?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Nov 20, 2008 2:27 pm

I copied your line to a text file and then ran the following code:

ReadLn>d:\file.txt,1,line

And the text was read in correctly. I tried it in v10 and v11.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Thu Nov 20, 2008 2:41 pm

Notepad will do some automatic character conversion when it opens a file. If you open that same file in a hex editor what characters do you see?

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Hex Characters

Post by kpassaur » Thu Nov 20, 2008 6:10 pm

That is what it has to be. I'll just have to find a way to deal with it.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts