Jump to content

change text file encoding


ashosheh
 Share

Recommended Posts

hi all

i have a text file that contains three lines of text, when i open the file in (notepad), the three lines are shown in one line , but when i open the file using wordpad, the three lines are displayed correctly. is there a way to change the text file encoding without having to open it in wordpad and saving the file.

thanx

Link to comment
Share on other sites

Hello, and welcome to the Windows Forum!

The behavior of your text file has nothing to do with encoding, but with the way end-of-line is handled. In Unix, an EOL consists of a linefeed (LF) character (0x0A). However on Windows EOL contains both a LF and CR (carriage return) character (0x0D).

So it seems that you have a Unix text file with only LF as EOL indicators. This happens to me sometimes, and this is what I do to correct it: using FTP I send it to a Unix system in binary mode, then get it back in ASCII mode, and voilà - the lines are now terminated with LF and CR.

If you do not have a Unix system to perform this operation, you can send me your text file via PM (personal message), and I can do it for you.

Link to comment
Share on other sites

Hello, and welcome to the Windows Forum!

The behavior of your text file has nothing to do with encoding, but with the way end-of-line is handled. In Unix, an EOL consists of a linefeed (LF) character (0x0A). However on Windows EOL contains both a LF and CR (carriage return) character (0x0D).

So it seems that you have a Unix text file with only LF as EOL indicators. This happens to me sometimes, and this is what I do to correct it: using FTP I send it to a Unix system in binary mode, then get it back in ASCII mode, and voilà - the lines are now terminated with LF and CR.

If you do not have a Unix system to perform this operation, you can send me your text file via PM (personal message), and I can do it for you.

HI , thanx for your reply.

you are completely right, the text file has come from a unix system, the problem is i use oracle forms with webUtil library, this library downloads the file from unix application server as a binary file, tha's why i can't use ASCII mode in FTP.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy