Direct Printing: accented letters

cclomba
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;
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;
0
Comments
-
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... ;-)0
-
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?0 -
You can try to recode the characters from Win to DOS. You can find downloads regarding this in download section.0
-
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).
Suerte0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions