Posted inDynamics NAV & BC Tips & tricks
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…