hema_jone_mickey
asked on
how to convert Apple mac text file,to a normal windows encoding
hi i want to read a file written on a mac os. could this be done
in c#
in c#
ASKER
i used the following code
FileStream ReadPdf = new FileStream("c:\\test.txt", FileMode.Open);
long FileSize;
FileSize = ReadPdf.Length;
byte[] Buffer = new byte[(int)FileSize];
ReadPdf.Read(Buffer, 0, (int)ReadPdf.Length);
String str = System.Text.Encoding.Defau lt.GetStri ng(Buffer) ;
ReadPdf.Close();
but it's supposed it's Arabic ,it returned arabic words but no understandable
so what is the solution ,and what type to save the file in
and thanks
FileStream ReadPdf = new FileStream("c:\\test.txt",
long FileSize;
FileSize = ReadPdf.Length;
byte[] Buffer = new byte[(int)FileSize];
ReadPdf.Read(Buffer, 0, (int)ReadPdf.Length);
String str = System.Text.Encoding.Defau
ReadPdf.Close();
but it's supposed it's Arabic ,it returned arabic words but no understandable
so what is the solution ,and what type to save the file in
and thanks
ASKER
an dhow to do it SRigney
How did you get the file from the Apple into the Windows operating system?
Ftp is my preferred method.
Ftp is my preferred method.
ASKER
i don't ask how to get the file ,i ask about the conversion to the readable format by windows .how to convert from C# Code the MAC FORMAT TO THE WINDOWS FORMAT?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Apple only uses the either the Line Feed or Carriage Return character at the end of each line (not sure which one), while Windows uses Line Feed and Carriage Return, but other than that there shouldn't be a problem.