Menu

#183 Encoding error in script under linux

v1.0_(example)
open
nobody
None
1
2024-09-03
2024-06-12
No

Hi,

Here are the hard-copies with rv3033 where it works, and rv3451 where it doesn't work when printing. I haven't tested the revision where it breaks.

Here are pieces of source, and generated script.

oPrinter:Say( sIPlocal +" ("+iif(sIslocal==_("Yes"),;
"présent sur le LAN","non présent sur le LAN")+")", 65,178, 150,178)
oPrinter:Say( _("Public IP 4")     ,  10,188,  65,188,,oFont8i )
oPrinter:Say( sIPpublic4+" ("+iif(sIPfixe==_("Yes"),;
"IP fixe","IP non fixe")+")", 65,188, 150,188)
oPrinter:Say( _("Public IP 6")     ,  10,198,  65,198,,oFont8i )
job,589.00,836.00,2.8317,2.8339,utf8
page,1,mm,p
....
fnt,Times New Roman,21.67,400,0,0,
txt,184.1,504.4,424.8,504.4,,192.168.1.15  (non présent sur le LAN)

Thanks
A+

2 Attachments

Discussion

  • Aupeix Alain

    Aupeix Alain - 2024-06-29

    up

     
  • Alexander S.Kresin

    For string encoding to be done correctly, you need to set a printer's codepage.
    This may be done in HPrinter():New( cPrinter, lmm, nFormType , cdp ) call, using the 4th parameter, or after printer initializing:

    oPrinter:cdp := oPrinter:cdpIn := "UTF8" ( or other codepage )

    Regards, Alexander

     
  • Aupeix Alain

    Aupeix Alain - 2024-09-03

    Hi,

    oPrinter:cdp := oPrinter:cdpIn := "UTF8"

    This was the solution

    Thanks
    You can close

    A+

     

Log in to post a comment.