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.
Detecting encoding is not something that pure C/AL can help you with, so I naturally went the .NET way. My position is that there is nothing a computer can do that .NET cannot. My another position is that there is no problem that I have that nobody before me ever had. Combining these two, we reach a yet another position of mine, that there is nothing that computer can do, of which there is no C# example, and typically I look for those on http://stackoverflow.com/
So, here’s the solution.
Continue reading Detect file encoding in C/AL using .NET Interop
MSDN has started running a series of the How do I… videos for Microsoft Dynamics NAV 2013 (feed here). The idea is to showcase a technical feature in 5-15 minutes. The project is still ongoing, but a number of videos have just been released and announced on the Microsoft Dynamics NAV Team Blog.
The project is a joint effort by Plataan and Microsoft, and I participated as a technical expert in charge of seven videos. I’ve already recorded five of them, out of which three are online.
You can find the links below, and please come back to this page as I’ll update it as more videos are published.
Continue reading How Do I… Videos on MSDN
Somehow I’ve missed it earlier, but a wealth of information for developers, architects and technical consultants specializing in Microsoft Dynamics NAV is now available on MSDN in the Microsoft Dynamics NAV Developer Center.
While some of the resources there still forward you to PartnerSource, which won’t work for you if you are not a Microsoft Partner, many links will take you to publicly available information, documentation and tools that you can use to sharpen your Microsoft Dynamics NAV technical skills. Spiced up with a digest of Microsoft Dynamics NAV technical blogs, it can be a good morning coffee companion. Definitely worth your click!