Hi again,
The code Im using to read the file is I think pretty straightforward:
Private Sub DoOpenFile(ByVal ThisFile As String)
Dim Line As String
Try
Dim sr As System.IO.StreamReader = New
System.IO.StreamReader(ThisFile, True)
Line = sr.ReadLine()
sr.Close()
Catch Ex As Exception
MsgBox("Error reading file" & Chr(13) & Chr(13) & Ex.Message,
MsgBoxStyle.Critical Or MsgBoxStyle.OkOnly, "Error")
Exit Sub
End Try
Line = DoFormatLine(Line)
FillEditor(Line)
FileName = ThisFile
Editor.ReadOnly = False
Me.Text = "Editing " & FileName
End Sub
The text is created in an editor (MultiEdit) and looks like this:
FTX+AAK+1++Es bestehen Vereinbarungen, aus denen sich nachträgliche
Minderungen :des Entgelts ergeben können.+DE
When I open this in my app, it suddenly looks like this:
FTX+AAK+1++Es bestehen Vereinbarungen, aus denen sich nachtr�gliche
Minderungen :des Entgelts ergeben k�nnen.+DE
After your message I added the TRUE parameter in the streamreader (detect
encoding) and set the form's language to German... To no effect.
Tia,
Martin
"Göran Andersson" <guffa@guffa.comwrote in message
news:%23p7b6eTpHHA.2156@TK2MSFTNGP03.phx.gbl...
Quote:
Martin wrote:
Quote:
>Hi Göran,
>>
>Thanks for your reply. I'm saving the texts to a text (ascii) file. I'm
>not using any special encoding, in fact I don't have any experience using
>other character sets, so I am not aware of how to choose a special kind
>of encoding... Any help would be greatly appreciated.
>>
>
A file doesn't contain characters, it contains bytes, so every text file
uses some encoding to represent the characters as bytes.
>
The ASCII encoding doesn't support any special characters. You should use
the UTF-8 encoding. This is however the default for the methods in the
framework when you don't specify any encoding, so you have to have done
something to use some other encoding.
>
What does your code look like?
>
--
Göran Andersson
_____
http://www.guffa.com