how can i loop line by line through a unicode file ???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • M. Posseth

    how can i loop line by line through 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.OpenTextFil e(sFile, ForReading, , TristateTrue)
    Do Until TsStream.AtEndO fStream
    sLine = StrConv(Trim$(T sStream.ReadLin e), vbUnicode)
    MsgBox sLine
    Loop





  • M. Posseth

    #2
    Re: how can i loop line by line through a unicode file ???

    Just solved it myself

    damned i am good :-)





    "M. Posseth" <michelp@nohaus ystems.nl> wrote in message
    news:ch6t0p$9hf $1@reader11.wxs .nl...[color=blue]
    > 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[/color]
    on[color=blue]
    > 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.OpenTextFil e(sFile, ForReading, , TristateTrue)
    > Do Until TsStream.AtEndO fStream
    > sLine = StrConv(Trim$(T sStream.ReadLin e), vbUnicode)
    > MsgBox sLine
    > Loop
    >
    >
    >
    >
    >[/color]


    Comment

    Working...