AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Syed Rizwan Muhammad Rizvi
Expertise
I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.

Experience
Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > utf7, utf8 file types

Topic: VB.NET



Expert: Syed Rizwan Muhammad Rizvi
Date: 4/20/2006
Subject: utf7, utf8 file types

Question
How can you determine what type of encoding is inside a seemingly ascii file.  I get files with accented charcters which do not always show in text box correctly depending on how i read this file using streamreader object (.net).  If I specify utf8 all accented charcters show correctly but if a record has a plus sign + it does not read that record correctly.

Your help will be greately appreciated.


Answer
+ sign normally replaces a space in URL encoding, I propose u replace + sign with space and things will work fine. It is difficult to identify the encoding of a file unless the information is embedded with in the file, coz its upto us how we treat data in the file in memory, if we call it utf7 then its utf7 and so on.

Another way can be that before parsing the file you look at specific characters which are found in UTF 7 only and change the encoding type if need be.

or an easier option is always use UTF8 or UTF16 all previous char set will be included by default.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.