Print special characters on dot printer

Hello, does anyone have a code so that, from an ABL program, it accepts accents and characters in a dot printer? Thanks in advance.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
This isn't enough to go on. It is going to depend on how you are going to talk to the printer, which in turn depends on the driver supported/installed on your OS, e.g. PCL 4/5, PCL6, Postscript, etc.
 
This isn't enough to go on. It is going to depend on how you are going to talk to the printer, which in turn depends on the driver supported/installed on your OS, e.g. PCL 4/5, PCL6, Postscript, etc.
Thanks for the information, do you have any bibliography where I explain how to do it from ABL language, for a dot matrix printer? Thanks since now.
 

TomBascom

Curmudgeon
1) What operating system are you wanting to print on?

2) What is the target printer (or printers)? ("dot printer" covers an awful lot of ground)

3) What special characters does that printer support? Are the characters that you want to print supported? (This probably involves reading documentation from the printer manufacturer.)

4) How do you want to get data to the printer? (IOW - are you hoping to use "output to printer" or are you sending data to a report writer or do you want to create a PDF or must you use some 3rd party print management tools or do you have something completely different in mind?)

The techniques that you might use to achieve your goal of printing special characters depend on the answers to those questions and can vary quite a bit. Anything from "that's just built-in to Windows and will work without any effort" to "you're going to have to spend the next 3 years writing a custom drivers"...
 
1) What operating system are you wanting to print on?

2) What is the target printer (or printers)? ("dot printer" covers an awful lot of ground)

3) What special characters does that printer support? Are the characters that you want to print supported? (This probably involves reading documentation from the printer manufacturer.)

4) How do you want to get data to the printer? (IOW - are you hoping to use "output to printer" or are you sending data to a report writer or do you want to create a PDF or must you use some 3rd party print management tools or do you have something completely different in mind?)

The techniques that you might use to achieve your goal of printing special characters depend on the answers to those questions and can vary quite a bit. Anything from "that's just built-in to Windows and will work without any effort" to "you're going to have to spend the next 3 years writing a custom drivers"...
Thanks Tom.
As clear as always, I will collect specific data about the printer, the operating system is (Windows 10), I work on Progress 9,1D, the program generates plain ASCII text, that is where it does not recognize the ñ, é, á, etc.
 

tamhas

ProgressTalk.com Sponsor
This is likely to be a code page issue ... do you know what code page is the source of the characters?
 
This is likely to be a code page issue ... do you know what code page is the source of the characters?
It's a message you generated from the ABL program, for output as pure ascii. use OUTOUT TO PRINTER.
 

Attachments

  • programa_imprimir.jpg
    programa_imprimir.jpg
    128.5 KB · Views: 18

Rob Fitzpatrick

ProgressTalk.com Sponsor
It might help you to look through the Progress documentation. I don't have any 9.1D documentation, but in the 10.0B documentation set (available from docs.progress.com) there is a manual called OpenEdge Development: Internationalizing Applications. It has some general information on the concepts of localization and internationalization, code pages, character sets, etc., as well as Progress-specific implementation details for code page selection, code page conversion, stream handling, and more. Good luck.
 
It might help you to look through the Progress documentation. I don't have any 9.1D documentation, but in the 10.0B documentation set (available from docs.progress.com) there is a manual called OpenEdge Development: Internationalizing Applications. It has some general information on the concepts of localization and internationalization, code pages, character sets, etc., as well as Progress-specific implementation details for code page selection, code page conversion, stream handling, and more. Good luck.
I'll read it Rob, so far what I found is a detail of what I already programmed, but I'll see this information, I hope to find something to handle it from PUT Control or laog like that. Thank you.
 

Cecil

19+ years progress programming and still learning.
So, you are outputting the report to an file (.txt) and then somehow printing the ascii file to a printer???

Are the extended characters (accents) appearing in the ascii file correctly?

How are you printing the .txt file to the printer?

What is the substituted character that is being printed on the dot matrix printer?

From experience (20+ years ago), I know that Epson and Oki dot matrix printers had dip switches to set the correct language/Country. Is this something applicable to your model of printer?

Screen shot of Epson MX-80 manual:

1643358654252.png

Also, it would be nice to know what code page you are using. I'm guessing ISO885-1???


message session:cpstream skip
session:cpinternal skip
session:charset.
 
Last edited:
So, you are outputting the report to an file (.txt) and then somehow printing the ascii file to a printer???

Are the extended characters (accents) appearing in the ascii file correctly?

How are you printing the .txt file to the printer?

What is the substituted character that is being printed on the dot matrix printer?

From experience (20+ years ago), I know that Epson and Oki dot matrix printers had dip switches to set the correct language/Country. Is this something applicable to your model of printer?

Screen shot of Epson MX-80 manual:

View attachment 2517

Also, it would be nice to know what code page you are using. I'm guessing ISO885-1???
I really thank you, the information, the technology is old, but it is what is in the place. It happens that I was never interested in hardware, I only dedicated myself to programming in GUI and CHUI in Progress. I would appreciate it if you could send me an example (if you have one), that would save me time. Thank you very much again.
 
So, you are outputting the report to an file (.txt) and then somehow printing the ascii file to a printer???

Are the extended characters (accents) appearing in the ascii file correctly?

How are you printing the .txt file to the printer?

What is the substituted character that is being printed on the dot matrix printer?

From experience (20+ years ago), I know that Epson and Oki dot matrix printers had dip switches to set the correct language/Country. Is this something applicable to your model of printer?

Screen shot of Epson MX-80 manual:

View attachment 2517

Also, it would be nice to know what code page you are using. I'm guessing ISO885-1???
The concrete problem, when you have to print Ñ á é ñ, other symbols come out.
 

TomBascom

Curmudgeon
Not every printer problem can be solved with code. Sometimes, as Cecil points out, you have to the walk up to the printer and set switches and so forth. Especially on older equipment. Which you seem to have.

And even if you can solve it with code you very often need to know a lot about what printer is being used.

We have asked you several times what printer you are using but you have not answered.

We cannot magically send you an example that will help you without that information.
 
Not every printer problem can be solved with code. Sometimes, as Cecil points out, you have to the walk up to the printer and set switches and so forth. Especially on older equipment. Which you seem to have.

And even if you can solve it with code you very often need to know a lot about what printer is being used.

We have asked you several times what printer you are using but you have not answered.

We cannot magically send you an example that will help you without that information.
If it is true, the printer is an EPSON FX-890, with a cart tractor, thanks in advance.
 

TomBascom

Curmudgeon
I usually use ISO8859-1 or UTF8 ;)

Please run this and share the output:
Code:
display
  session:cpinternal format "x(20)" label "cpinternal"
  session:cpstream   format "x(20)" label "cpstream"
  session:cpprint    format "x(20)" label "cpprint"
  session:cpterm     format "x(20)" label "cpterm"
  asc( "n" ) label "unaccented n"
  asc( "ñ" ) label "accented n"              /* <---  you may need to manually replace "n" with an accented n... */
 with
  1 column
  no-box
.

The accented ñ may not copy & paste correctly - you might have to manually correct that when you paste this snippet into your editor.
 
I usually use ISO8859-1 or UTF8 ;)

Please run this and share the output:
Code:
display
  session:cpinternal format "x(20)" label "cpinternal"
  session:cpstream   format "x(20)" label "cpstream"
  session:cpprint    format "x(20)" label "cpprint"
  session:cpterm     format "x(20)" label "cpterm"
  asc( "n" ) label "unaccented n"
  asc( "ñ" ) label "accented n"              /* <---  you may need to manually replace "n" with an accented n... */
 with
  1 column
  no-box
.

The accented ñ may not copy & paste correctly - you might have to manually correct that when you paste this snippet into your editor.
Now, how do I modify this data in the "session" and change to "UTF-8", I have no experience modifying work environments, so far I managed with the basics and it worked for me. Thanks since now.
 

Attachments

  • error_printer_char.jpg
    error_printer_char.jpg
    12.1 KB · Views: 10

Rob Fitzpatrick

ProgressTalk.com Sponsor
Now, how do I modify this data in the "session" and change to "UTF-8", I have no experience modifying work environments, so far I managed with the basics and it worked for me. Thanks since now.
I don't think you need a data fix. I think the problem is that your 4GL session and your printer are using different means of encoding/decoding data.

Again, I'll suggest that you read OpenEdge Development: Internationalizing Applications. You need to understand data-encoding concepts, both generically and in terms of the Progress-specific configuration options.
 
Top