Objectmix
Tags Register Mark Forums Read

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 ...


Object Mix > Microsoft Tools > Axapta > get file encoding

Axapta Microsoft AXAPTA ERP administration, client setup, connectivity, development, clustering, hosting, sizing and other related discussions

Reply

 

LinkBack Thread Tools
  #1  
Old 06-08-2009, 03:49 AM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default get file encoding

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 ?

and if possible convert it to ANSI before reading?

Thanks,

Budje
Reply

Thread Tools



All times are GMT -5. The time now is 08:30 AM.

Managed by Infnx Pvt Ltd.