Loop through unicode file aaahrghhh


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Loop through unicode file aaahrghhh

  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

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center