Skip to content

Instantly share code, notes, and snippets.

@isamert
Created June 6, 2017 13:17
Show Gist options
  • Save isamert/553e1672dea4a9582a6a7b9d1bed94e7 to your computer and use it in GitHub Desktop.
Save isamert/553e1672dea4a9582a6a7b9d1bed94e7 to your computer and use it in GitHub Desktop.
A dolphin service menu for converting files to UTF8 from different encodings
# Converts Turkish(Windows-1254) encoded subtitle files UTF8.
# You can change Windows-1254 to any encoding you want at line 24.
# Check this web page for your language:
# https://www.w3.org/International/O-charset-lang.html
# You can change/add MimeType to text/plain (or, again, anything you want)
# to be able to convert plain text files to UTF8 at line 17.
# Copy this file to this location: ~/.local/share/kservices5/ServiceMenus/
# and run: kbuildsycoca5
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/x-subrip;
Actions=ConvertToUTF8;
X-KDE-Priority=TopLevel
X-KDE-StartupNotify=false
[Desktop Action ConvertToUTF8]
Icon=text-x-generic
Name=Convert to UTF8
Exec=iconv -f Windows-1254 -t UTF-8 %u > %u.tmp; rm %u;mv %u.tmp %u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment