Working with text. Custom text encoding.

It may seem like working with text is one of the simplest things to do. However, in reality, it is quite a deep topic and not as easy as it may appear at first glance. In this article, we will cover the main approaches to working with text, as well as discuss the issue of text encoding

Source : Volodymyr Dvernytskyi
Read more…

Expanding XMLport with new encodings

There comes times when you need to export data in XML-format from NAV.

If you’re running a ‘modern’ version you’ll have the object type XMLport to create the XML Document. In the past you would need to create the XML Document using the XML DOM (ref. COD6814 Encode XML in MS codebase).

Bron : Yet another NAV blog
Lees meer…

Detect file encoding in C/AL using .NET Interop

When importing files using XMLports, and especially when handling text files, file encoding is important. If the XMLport expects ASCII, and you feed it UTF-8, you may get scrambled data. If you have mismatching unicode input files, it may just fail altogether. Therefore, making sure that encoding is correct before you actually start gobbling input files might be important.

At least it was for me. I am currently automating data migration for a major go-live, and I am feeding some 30 input files to NAV, and I want to make sure they are all encoded correctly before I enter a process which would take another geological era to complete.

Bron : Vjeko.com
Lees meer…