Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 3.5 and Visual Studio. 2008 > Visual Studio 2008
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Visual Studio 2008 For discussing Visual Studio 2008. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2008 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 15th, 2012, 12:25 PM
Authorized User
Points: 173, Level: 3
Points: 173, Level: 3 Points: 173, Level: 3 Points: 173, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Processing large UTF-8 non-text files

Hi, I have to filter out strings of UTF-8 strings in a large (100 MB) non-text file, i.e. the file cannot be read StreamReader.ReadLine or ReadAll. Since its UTF-8, it has 2 bytes/character, I've never worked with byte arrays that encode UTF-8, and I would prefer not to.

Is there a way to read fixed chunks of UTF-8 (say 1000 chars / 500 chars) ?

If NOT, can anyone give me a working example of what to do correctly with the byte arrays ?

I guess I'd have to read an even number of bytes, and then insert a CR/LF after those bytes, and save this garbage in a new file. Would this work ?

Thanks,
Mike
Reply With Quote
  #2 (permalink)  
Old February 16th, 2012, 05:12 AM
Authorized User
Points: 173, Level: 3
Points: 173, Level: 3 Points: 173, Level: 3 Points: 173, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Problem solved with Notepad++, where I managed to automatically insert CR/LF at the "right" places. The rest was simple.

Mikey

Last edited by mike_abc; February 16th, 2012 at 05:14 AM.
Reply With Quote
Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unicode UTf-8? System.Text.UTF8Encoding from VBA? forum1 VBScript 7 May 20th, 2011 12:29 PM
Copying large files across network RobCarter Visual Studio 2005 0 July 17th, 2009 06:24 AM
Reading large files ravichandrae Pro Java 1 January 11th, 2008 03:42 AM
Strategies for large XML files asearle XSLT 7 September 28th, 2006 02:38 AM
Uploading Large Files to a Doc Lib viccoleman SharePoint Admin 1 May 15th, 2006 01:13 PM



All times are GMT -4. The time now is 03:00 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.