DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Location
    Europe , Netherlands , Rotterdam
    Posts
    69

    Unhappy Loop through unicode file aaahrghhh

    does anyone know why this code fails wih a unicode file ??

    i have a big problem :-(

    i need to loop line by line through a unicode text file

    if i use below code on Ansi text files it works like expected ,, however on
    unicode files i receive sections

    example

    test1
    test2
    test3

    results with ansi in three seperate msgboxes

    however a unicode file wil give one msgbox with the three lines i already
    thought that this would not be such a big problem because it should be
    possible to split the string with vbcrlf
    however this does also not work

    anyone an idea ??????

    Set TsStream = fso.OpenTextFile(sFile, ForReading, , TristateTrue)
    Do Until TsStream.AtEndOfStream
    sLine = StrConv(Trim$(TsStream.ReadLine), vbUnicode)
    MsgBox sLine
    Loop

  2. #2
    Join Date
    Aug 2004
    Location
    Europe , Netherlands , Rotterdam
    Posts
    69

    Lightbulb

    solved it



    unicode text strings are separated by cariage returns whitout line feeds

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links