Tag Info

New answers tagged

0

You will need iconv, but convmv and cconv are optional. Step 1, find the correct char-encode converting chain. Step 2, rename files by a shell script. Sometimes, there is a wrong character encoding in the converting chain. You have to find the gap out, by the way in enzotib's post. For example, a file named "冼极.otf" in an utf8 file system. touch 冼极.otf ...


3

I can't comment on best answer in this thread, so here is mine. Personally, I use these aliases for URL encoding and decoding: alias urlencode='python -c "import urllib, sys; print urllib.quote( sys.argv[1] if len(sys.argv) > 1 else sys.stdin.read()[0:-1])"' alias urldecode='python -c "import urllib, sys; print urllib.unquote(sys.argv[1] if ...


1

If you don't want to convert it as mentioned in Rmano's answer, you may use Geany or Kate to read/edit them ar they are, default Arabic encoding in Windows is CP-1256 (WINDOWS-1256). Just keep in mind that switching to UTF-8 is recommended over all. It is supported by Notepad++ and Windows default note editor. Geany sudo apt-get install geany Kate ...


4

ANSI means more or less nothing --- the most probable candidate for your encoding is Windows-1252. You can convert the file with iconv -f WINDOWS-1252 -t utf8 < filein.txt > fileout.txt but remember, most encodings (read the linked article if you are not sure about what that mean) can't be reliably guessed, so you need to know the exact encoding ...


5

Windows uses CR+LF for line breaks. In Linux/Unix you need LF. Therefore you have to replace CR+LF into LF in your script: Install dos2unix sudo apt-get install dos2unix And correct your script via dos2unix <your_script_file> or via dos2unix -n <your_script_file> <out_file> if you need a different output file More informations ...


17

Windows and Linux have different end-of-line symbols. You can install the dos2unix utility that fixes it: sudo apt-get install dos2unix Run it this way: dos2unix -n winfile.txt linuxfile.txt There is also the unix2dos utility. The Windows-to-Linux conversion can also be done without installing any special software by tr -d '\r' < winfile.txt ...


6

On Windows, you need to change the End of Line (EOL) format in Notepad++ to UNIX: That way it will work on Ubuntu too.



Top 50 recent answers are included