Hi!
There is a problem in Mono 1.0 when replacing in a string or stringbuilder object.
Try
'Dim myBuffer As New System.Text.StringBuilder
Dim mybuffer As String
Dim myReader As New System.IO.StreamReader(WindowsFile, System.Text.Encoding.Default, False)
Dim myWriter As New System.IO.StreamWriter(UnixFile, False, System.Text.Encoding.Default)
Console.WriteLine("Reading file...")
'myBuffer.Append(myReader.ReadToEnd)
mybuffer = myReader.ReadToEnd()
myReader.Close()
Console.WriteLine("Converting data...")
myBuffer.Replace(vbCrLf, vbLf)
Console.WriteLine("Writing file...")
myWriter.Write(myBuffer.ToString)
myWriter.Close()
Console.WriteLine("File successfully converted")
Catch ex As Exception
System.Console.WriteLine(ex.ToString)
System.Console.ReadLine()
End Try
The myBuffer variable contains a string of 7 MB. For small strings, it seems to work. But with larger ones as my 7 MB string, the line
myBuffer.Replace(vbCrLf, vbLf)
runs more than half an hour before finishing.
Can somebody please fix this asap? Thanks!!!
Regards
Jochen
****************************************************************************
****************************************************************************
CompuMaster GmbH
Agentur f�r moderne Kommunikation
Jochen Wezel, Multimedia-Programmierung
Rhein-Mosel-Stra�e 69, 56281 Emmelshausen, GERMANY
Fon: +49 6747 95084-12 / Fax: +49 6747 95084-50
http://www.compumaster.de eMail: [EMAIL PROTECTED]
+++ Mitglied im DEUTSCHEN MULTIMEDIA VERBAND d m m v, http://www.dmmv.de +++
****************************************************************************
Unsere aktuellen AGBs befinden sich auf unserer Website im Bereich
"Rechtliches"
****************************************************************************
Diese eMail enth�lt vertrauliche und/oder rechtlich gesch�tzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt�mlich
erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie
diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser
Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
****************************************************************************
****************************************************************************
