get file encoding : Axapta
This is a discussion on get file encoding within the Axapta forums in Microsoft Tools category; Hi, I'm reading files in ax using the ASCIIO class. These files are commaseperated and I check how many fields are inside the file. If there are too many/few I display an error message. Now I've noticed that when I read an UTF-8 encoded file the error message too many fields is displayed. This is , I believe, because a special character is added at the end. If I convert the file to ANSI is works just fine. Now the question is: How can I detect the encoding of the file so I can throw a decent error in advance ...
| Axapta Microsoft AXAPTA ERP administration, client setup, connectivity, development, clustering, hosting, sizing and other related discussions |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| I'm reading files in ax using the ASCIIO class. These files are commaseperated and I check how many fields are inside the file. If there are too many/few I display an error message. Now I've noticed that when I read an UTF-8 encoded file the error message too many fields is displayed. This is , I believe, because a special character is added at the end. If I convert the file to ANSI is works just fine. Now the question is: How can I detect the encoding of the file so I can throw a decent error in advance ? and if possible convert it to ANSI before reading? Thanks, Budje |

