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
Tag Archives: Encoding
Multilanguage across Conflicting Text Encoding Formats
To support users with translated strings across conflicting text encoding formats, you must save the translations to a text file in UTF-8 text encoding format.
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).
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.