PDA

View Full Version : Special Characters



douglasfanton
15-Jul-2022, 01:20 PM
Hi!
I want to explain my problem, but I can't write the whole text here.
I get and error about the limit of characters. Please look at the attachments.

Samuel Pizarro
15-Jul-2022, 02:41 PM
What kind of charsets/encoding your thermal printer accepts?

That's the 1st thing you need to know. What is the codepage/encoding your printer accepts, and what is the current one configured.

If it does accepts unicode chars, and if it's really configured that way, you just need to create the txt file without doing anything special, as DF-20 creates unicode strings by default.

But as you are facing errors, it seems that either your printer does not work with unidoce chars. or you are doing somehting else.

How are you genereting the txt file.. please share your code.


Note: Vi que vc eh do Brasil, e o forum tem uma seção em portugues.. talvez seja melhor postar suas duvidas la..

douglasfanton
15-Jul-2022, 03:32 PM
I think it's possible to write in English.
The printer is: Argox OS 214 plus.
Do you know the encoding the printer uses?
I can't find it on Google / user manual.

Samuel Pizarro
15-Jul-2022, 10:22 PM
Looking at manual ,pages 59 to 61
https://doc.argox.com/usermanual/O4-Series-User-Manual_V1.4_PT.pdf

it only supports utf-8 (unicode) when working in PPLZ mode.
PPLB supports windows code page 1252 ( Ansi).
but PPLA is very restrictive.

Harm Wibier
18-Jul-2022, 06:53 AM
It does sound like an encoding issue, and the fact that you were writing one character to print another already sounds like you where working around an encoding issue.

DataFlex now is unicode which includes that we changed the default encoding within DataFlex from OEM to UTF-8. Here is some recommended reading that might help:

https://docs.dataaccess.com/dataflexhelp/#t=mergedProjects%2FWelcome%2FUnicode_101.htm

https://docs.dataaccess.com/dataflexhelp/#t=mergedProjects%2FWelcome%2FUnicode_in_DataFlex. htm

douglasfanton
18-Jul-2022, 07:32 AM
The language I use is PPLA.
I see that PPLA is very restrictive.
But in VDF 19 I didn't use ToAnsi or ToOEM. I didn't use any conversion. And it worked perfectly.
Why?

douglasfanton
18-Jul-2022, 07:35 AM
I used Utf8ToOEM.
It seems to work now.
I'm gonna try other characters.

Samuel Pizarro
18-Jul-2022, 07:42 AM
per your original post, it was not working properly already...

You mentioned that you had to use different chars, in order to print the desired ones.. So, the encoding was not matching already.

using Utf8ToOEM may apperantly "work" now, for the small set of chars you are tyring. but there is no full correspondence between them. Unicode has thoudands of diff chars that OEM does not support.

If you really want to use Unicode in your printer, you must change your file to send PPLZ commands instead.

Samuel Pizarro
18-Jul-2022, 07:45 AM
by the way, this topic has nothing to do with webapps.. maybe better to relocate it to the windows or unidoce forum ?

douglasfanton
18-Jul-2022, 08:01 AM
Yes, you are right. Some chars are wrong.

douglasfanton
18-Jul-2022, 08:03 AM
It's a Web Application. But you are right. We are talking about code.
I don't know how to relocate.

douglasfanton
18-Jul-2022, 08:16 AM
I have this other manual (in Portuguese):

https://www.bztech.com.br/arquivos/manual-argox-os-214-plus.pdf

Page 72.
I think the printer is a little old (I don't have it here, with me).
It seems that the printer doesn't work with unicode, even if I use PPLZ.

Samuel Pizarro
18-Jul-2022, 08:37 AM
Possible remaining option are:

* to go true the printer driver, and print as if were an "image/picture" . and produce your labels using some kind of report tool , like DR, or Crystal, etc..

But, the print speed is drastically reduced.

* Or , bye a new printer..

* Or , remove completelly the special chars.. before sending data to the printer,

Can't think in any else as possible workarounds..

good luck

douglasfanton
18-Jul-2022, 08:51 AM
I'm gonna generate the chars in VDF 19, and copy them.
Only the mains chars.
Then I'm gonna use Replace in VDF 20.
It's not the best solution, but...

Thanks!

douglasfanton
18-Jul-2022, 12:37 PM
Does VDF 19 work with ANSI? OEM? Which of those codes?

Samuel Pizarro
18-Jul-2022, 01:04 PM
OEM.

but you can create an ANSI file using

writeln ToAnsi(“….”)