Oddball text question

Library for macros
User avatar
doobes
Posts: 132
Joined: Sat Apr 16, 2022 5:59 pm
Answers: 1
Location: Williamsburg, VA
x 12
x 84
Contact:

Oddball text question

Unread post by doobes »

So for reasons I cannot explain, I've wound up with paper copies of some VBA code that I want to use.

I've gone through a scanning process and corresponding OCR, (all on a Linux box, BTW) which works pretty well....

but, and there is always a but;

Some of the text is obviously OCR'ed in a non-standard text encoding.

I've imported it into the VBA IDE and the odd line simply will not run.

If I type the exact same line, character by character, it will run, thus the encoding conclusion.

Any thoughts as to a process to run through to ensure the text encoding is the one that the VBA IDE wants to see?

I tried changing the encoding to ANSI in Notepad++ but that had no effect.

Thanks for any thoughts.
chris
User avatar
gupta9665
Posts: 412
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 434
x 450

Re: Oddball text question

Unread post by gupta9665 »

I have seen issues with the double quotes using similar process, so I type them and then all is good. So, check if this is the case with your line.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
ryan-feeley
Posts: 82
Joined: Thu Jan 20, 2022 3:35 pm
Answers: 1
x 31
x 91

Re: Oddball text question

Unread post by ryan-feeley »

I expect @gupta9665 is on to something with the quotations.

Be careful on ANSI (8 bits) v ASCII (7 bits). They overlap on the first 128 characters, but ANSI has another 100 or so odd-balls. These include a few variations on quotation marks and other stuff that isn't on a typical keyboard. I could easily see your scanner picking something obscure. I'd try again with ASCII encoding and see if that works.
User avatar
JSculley
Posts: 646
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 878

Re: Oddball text question

Unread post by JSculley »

What OCR software are you using on the Linux machine?

Also, can you upload one of the misbehaving files?
User avatar
doobes
Posts: 132
Joined: Sat Apr 16, 2022 5:59 pm
Answers: 1
Location: Williamsburg, VA
x 12
x 84
Contact:

Re: Oddball text question

Unread post by doobes »

ryan-feeley wrote: Sun Feb 18, 2024 1:13 pm I expect @gupta9665 is on to something with the quotations.

Be careful on ANSI (8 bits) v ASCII (7 bits). They overlap on the first 128 characters, but ANSI has another 100 or so odd-balls. These include a few variations on quotation marks and other stuff that isn't on a typical keyboard. I could easily see your scanner picking something obscure. I'd try again with ASCII encoding and see if that works.
Bingo

I'm using OCRFeeder - https://wiki.gnome.org/Apps/OCRFeeder

Switching to ANSI via Notepad++ converted some of the quotation marks into weird characters.

Thank you!
chris
Post Reply