Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Find out encoding of any file [modified]

Find out encoding of any file [modified]

Scheduled Pinned Locked Moved Visual Basic
comtestingbeta-testinghelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jonegerton
    wrote on last edited by
    #1

    I need to find the encoding of a file that I've opened through code so that I can convert strings to byte arrays using the same encoding. This includes word documents - the one I'm testing is Windows (1252) - according to EditPad, The normal examples that return the variations on UTF8/Unicode are not sufficient. Is there a way to acheive this? In the course of my code I'm opening the documents as byte arrays via a filestream, so some way of extracting the encoding from there would be most useful. Thanks in advance for your help For more information on what I'm actually trying to acheive, see my other post: http://www.codeproject.com/Messages/3303167/Replacing-Bytes-in-an-Office-2003-Word-Document.aspx[^]

    modified on Monday, December 14, 2009 9:29 AM

    L 1 Reply Last reply
    0
    • J jonegerton

      I need to find the encoding of a file that I've opened through code so that I can convert strings to byte arrays using the same encoding. This includes word documents - the one I'm testing is Windows (1252) - according to EditPad, The normal examples that return the variations on UTF8/Unicode are not sufficient. Is there a way to acheive this? In the course of my code I'm opening the documents as byte arrays via a filestream, so some way of extracting the encoding from there would be most useful. Thanks in advance for your help For more information on what I'm actually trying to acheive, see my other post: http://www.codeproject.com/Messages/3303167/Replacing-Bytes-in-an-Office-2003-Word-Document.aspx[^]

      modified on Monday, December 14, 2009 9:29 AM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See my answer above.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups