JOSE_LUIS_VEGA
Member
Hello, does anyone have a code so that, from an ABL program, it accepts accents and characters in a dot printer? Thanks in advance.
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.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 Tom.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"...
It's a message you generated from the ABL program, for output as pure ascii. use OUTOUT TO PRINTER.This is likely to be a code page issue ... do you know what code page is the source of the characters?
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.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.
message session:cpstream skip
session:cpinternal skip
session:charset.
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.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???
If it is true, the printer is an EPSON FX-890, with a cart tractor, thanks in advance.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.
Page 14 lists the supported code pages (character tables). The default is PC 437 Code page 437 - Wikipedia
Is your Progress session using PC 437?
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
.
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 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 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.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.