Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Text File encoding?
Old
  (#1)
jamie
Guest
 
Posts: n/a
Default Text File encoding? - 06-04-2007, 09:46 AM

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
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Text File encoding?
Old
  (#2)
Randy Birch
Guest
 
Posts: n/a
Default Re: Text File encoding? - 06-04-2007, 09:46 AM

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
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.


"jamie" <EMAIL REMOVED> wrote in message
news:rBRUc.15887$EMAIL REMOVED. ..
: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

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Text File encoding?
Old
  (#3)
jamie
Guest
 
Posts: n/a
Default Re: Text File encoding? - 06-04-2007, 09:46 AM

Randy Birch wrote:
> 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))?


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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top