Direct Printing: accented letters

cclombacclomba Member Posts: 3
Hello and sorry for my poor english,

I have a function that prints labels for direct printing (with the library NaviPrinter). The label i want to print is an xml file, the problem is that on printed I get strange characters instead of accented letters (like á or é) and yet if I edit the xml file looks everything correctly. Does anyone know what I can do?

Here is the code:


index := 1;
fichero.OPEN(conf_warehouse."SEUR Path XML Responses"+'response_'+FORMAT(DELCHR(v_pedido,'=','/'))+'_'+FORMAT(v_bulto)+'.xml');
fichero.TEXTMODE(TRUE);
fichero.CREATEINSTREAM(traza_inStream);
IF fichero.LEN > 0 THEN REPEAT
IF (traza_inStream.READTEXT(traza_read) > 0) THEN
a_trazas[index] := traza_read;
index += 1;
UNTIL traza_inStream.EOS;
index_max := index - 1;

conf_warehouse.GET;
conf_warehouse.TESTFIELD(conf_warehouse."SEUR Printer");
CREATE(NaviPrinter);
index := 2;

REPEAT
NaviPrinter.DirectPrint(conf_warehouse."SEUR Printer",a_trazas[index]);
index += 1;
UNTIL index > index_max;

Comments

  • kinekine Member Posts: 12,562
    Do not forget that NAV is working with DOS codepage, not Windows codepage. It means, you need to think about the editor, through whcih you are looking to the XML file. That you see it OK doesn't mean that it is ok when you read it into NAV... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • cclombacclomba Member Posts: 3
    kine wrote:
    Do not forget that NAV is working with DOS codepage, not Windows codepage. It means, you need to think about the editor, through whcih you are looking to the XML file. That you see it OK doesn't mean that it is ok when you read it into NAV... ;-)

    Thanks!

    do you know what can I do to print the characters correctly?
  • kinekine Member Posts: 12,562
    You can try to recode the characters from Win to DOS. You can find downloads regarding this in download section.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • BleikaBleika Member Posts: 10
    Hi,

    Accented letters and special characters (Ñ,Ç,etc.) will have to be converted.
    You could have a look at some of the ES objects in your DB that manipulate text to obtain code samples ("Exportar 347" or similar).

    Suerte
Sign In or Register to comment.