Strange chars in textfile
Strange chars in textfile
Strange chars in textfile
Strange chars in textfile
Strange chars in textfile
Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile
Strange chars in textfile Strange chars in textfile
Strange chars in textfile
Go Back  Xtreme Visual Basic Talk > > > Strange chars in textfile


Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2010, 05:19 AM
Pcbmans Pcbmans is offline
Newcomer
 
Join Date: Jul 2010
Location: Breda
Posts: 10
Default Strange chars in textfile


Hello,

I write one line of text to a file and when I looked into the file I see three chars which I did not write
I see this :
"D:\.......
Where are this chars from?
Do I something wrong

Regards

Mans

wFile = My.Computer.FileSystem.OpenTextFileWriter("c:\mans.cmd", False)
wFile.Write(Chr(34) & PrjSets.ApplicationPath & PlotExpPdfs & Chr(34) & " " & Chr(34) & ExpeditionWindowName & Chr(34) & " " & PrjSets.ProjPath & _
" " & PrjSets.Projectname & " " & "Temp")
wFile.Close()
Reply With Quote
  #2  
Old 11-29-2010, 06:13 AM
snarfblam's Avatar
snarfblamStrange chars in textfile snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

Is it possible that your writing with one encoding and viewing with another?

Edit: Did a little digging, and found that "" is what you get if you view the unicode byte order mark (BOM) in ASCII. In hex, "" is EF BB 22, which is the UTF-8 for the BOM character.

Quote:
Originally Posted by Wikipedia
Many Windows programs (including Windows Notepad) add the bytes 0xEF, 0xBB, 0xBF at the start of any document saved as UTF-8...Older text editors may display the BOM as "" at the start of the document, even if the UTF-8 file contains only ASCII and would otherwise display correctly.
You can think of this as a "magic number" to identify a UTF-8 file.
__________________
C# _VB.NET _

Last edited by snarfblam; 11-29-2010 at 06:27 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Strange chars in textfile
Strange chars in textfile
Strange chars in textfile Strange chars in textfile
Strange chars in textfile
Strange chars in textfile
Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile Strange chars in textfile
Strange chars in textfile
Strange chars in textfile
 
Strange chars in textfile
Strange chars in textfile
 
-->