Advertisement
nykon

Convert Eclipse Projects to IntelliJ (UTF-8)

Apr 25th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. # This bash script is tested with gygwin on Windows 10
  2. #
  3. # This script will take your Eclipse (or any windows-1251 encoded files) and will make them
  4. # ready for import into IntelliJ.
  5. #
  6. # If your coming from Eclipse here's a little more input:
  7. # https://z0ltan.wordpress.com/2011/12/25/changing-the-encoding-in-eclipse-to-utf-8-howto/
  8. # https://bugs.eclipse.org/bugs/show_bug.cgi?id=108668
  9. #
  10. # IMPORTANT: use the command
  11. #   sed -i 's/\r$//' FILENAME
  12. # to make your notepad file linux compatible (set line endings properly)
  13. #
  14.  
  15. find ./ -name *.java -type f -print0|
  16. while read -d '' -r file
  17. do
  18.   echo " $file"
  19.   mv "$file" "$file".tmp
  20.   iconv -f windows-1251 -t utf-8 "$file".tmp > "$file"
  21.   rm "$file".tmp;
  22. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement