Consulting

Results 1 to 2 of 2

Thread: Read from txt file in utf-8

  1. #1
    VBAX Regular
    Joined
    May 2005
    Posts
    19
    Location

    Read from txt file in utf-8

    I use the scripting method

    [VBA]
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.OpenTextFile(path, 1, x)
    [/VBA]

    for reading from a text file which is in the utf-8 charset. Whichever of the three values {0, -1, -2} I use for x above, the characters are not displayed propely (I use the text from the file for writing into cells).

    What can I do about it?

    Antonin

  2. #2
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    You might consider using an ADODB.Stream which has a charset property. See.

    http://www.w3schools.com/ado/ado_ref_stream.asp

    .02

    Stan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •