Text File encoding?

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

    #1

    Text File encoding?

    I have a file that was generated on a customers computer which is not
    using the Windows default text encoding but uses Japanese(Shift-JIS)
    encoding.

    If I open the file in notepad the data looks normal but my application
    can not read in the data properly (Line breaks are not what is expected)

    Is there a way to translate a file to the windows default text encoding?

    Also, is there an API to determine the which encoding a system is using?

    Thanks,

    Jamie
  • Randy Birch

    #2
    Re: Text File encoding?

    What do you mean by "line breaks are not what is expected"? Do you mean the
    ASCII/ANSI character codes for a linefeed/newline are not vbCrLf (chr$(13) &
    chr$(10))?

    --

    Randy Birch
    MVP Visual Basic

    Please respond only to the newsgroups so all can benefit.


    "jamie" <jamie@noway.co m> wrote in message
    news:rBRUc.1588 7$ZI1.755731@ne ws20.bellglobal .com...
    :I have a file that was generated on a customers computer which is not
    : using the Windows default text encoding but uses Japanese(Shift-JIS)
    : encoding.
    :
    : If I open the file in notepad the data looks normal but my application
    : can not read in the data properly (Line breaks are not what is expected)
    :
    : Is there a way to translate a file to the windows default text encoding?
    :
    : Also, is there an API to determine the which encoding a system is using?
    :
    : Thanks,
    :
    : Jamie

    Comment

    • jamie

      #3
      Re: Text File encoding?

      Randy Birch wrote:[color=blue]
      > What do you mean by "line breaks are not what is expected"? Do you mean the
      > ASCII/ANSI character codes for a linefeed/newline are not vbCrLf (chr$(13) &
      > chr$(10))?[/color]

      No I mean that the line breaks are not added in the correct locations
      (if converting the encoding with word)... for example it adds 3
      linebreaks to the end of the document and splits up a couple of lines
      where there are spaces between the data.

      Jamie


      Comment

      Working...