I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
Go Back  Xtreme Visual Basic Talk > > > I need output encoding to ANSI, not using StreamReader


Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2013, 08:53 AM
HappyJoni's Avatar
HappyJoni HappyJoni is offline
Centurion
 
Join Date: Jun 2003
Location: New Jersey
Posts: 169
Question I need output encoding to ANSI, not using StreamReader


Hi,

My output is currently being encoded at UTF-8, which I know is the default, and can't seem to figure out how to change it to ANSI. I do know I can specify the encoding using the overloads, but can't figure out how. Was hoping someone could fill in my 'BLANK'.

My.Computer.FileSystem.WriteAllText(fullPath, sb.ToString, False, 'BLANK')

I've been searching online but have not been able to find any examples of this being done. Is this not the correct way to do it?

Please help!

TIA,
Joni
Reply With Quote
  #2  
Old 04-29-2013, 10:24 AM
HappyJoni's Avatar
HappyJoni HappyJoni is offline
Centurion
 
Join Date: Jun 2003
Location: New Jersey
Posts: 169
Default

Took me almost 2 hours but finally figured it out.

I had to include 'Imports.System.Text'
Then, change my 'WriteAllText' line to change the default encoding to Ascii.

My.Computer.FileSystem.WriteAllText(fullPath, sb.ToString, False, Encoding.ASCII)
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
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
 
I need output encoding to ANSI, not using StreamReader
I need output encoding to ANSI, not using StreamReader
 
-->