Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: Tweaks for Leafpad

  1. #11
    Join Date
    Sep 2005
    Beans
    1,606
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Tweaks for Leafpad

    Considering the ASCII code is quite different, and Ubuntu variants support all sorts of textual options (I can copy and paste Chinese, Japanese, Russian, Korean and it won't skew or mis-convert it), you'll have to look for a program that can directly convert that for you. I don't know of one.

    iconv works in terminal:
    shawn@shawn-Satellite-C75D-A:~/Downloads$ echo Orākei > test.txt
    shawn@shawn-Satellite-C75D-A:~/Downloads$ iconv -f UTF-8 -t ASCII//TRANSLIT ./test.txt
    Orakei
    Where's [slooksterpsv] been? - I had Catastrophic partition alignment failure. I lost 90%+ of my data, and just now got it back fixed and working.

  2. #12
    Join Date
    Sep 2005
    Beans
    1,606
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Tweaks for Leafpad

    There I made an HTML file that you can copy the content in, click a button, and it'll do the rest. Just untar gz the file.
    Attached Files Attached Files
    Where's [slooksterpsv] been? - I had Catastrophic partition alignment failure. I lost 90%+ of my data, and just now got it back fixed and working.

  3. #13
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Lubuntu 14.10 Utopic Unicorn

    Re: Tweaks for Leafpad

    thanks slooksterpsv, I was thinking about something along these lines. Please see post #3, will the chinese characters be preserved ? This is what I did not know about doing.
    Last edited by bapoumba; March 25th, 2014 at 08:58 AM. Reason: typo
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests by PM, thanks |

  4. #14
    Join Date
    Sep 2005
    Beans
    1,606
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Tweaks for Leafpad

    Yes it looks like it just removes the accents from the characters. It didn't change the Chinese words.
    Where's [slooksterpsv] been? - I had Catastrophic partition alignment failure. I lost 90%+ of my data, and just now got it back fixed and working.

  5. #15
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Lubuntu 14.10 Utopic Unicorn

    Re: Tweaks for Leafpad

    Quote Originally Posted by slooksterpsv View Post
    Yes it looks like it just removes the accents from the characters. It didn't change the Chinese words.
    Thanks, potential hero of the day
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests by PM, thanks |

  6. #16
    Join Date
    Sep 2005
    Beans
    1,606
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Tweaks for Leafpad

    Tried to make a gedit plugin, it's not working too well =( - if I can get javascript to take over the handling of the conversion, that'd be great! But it's not working like that haha.
    Where's [slooksterpsv] been? - I had Catastrophic partition alignment failure. I lost 90%+ of my data, and just now got it back fixed and working.

  7. #17
    Join Date
    Sep 2005
    Beans
    1,606
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Tweaks for Leafpad

    You are so welcome for this one, here's a plugin that will do what you want in gedit. It tooke me a few hours, but I got it =D

    Just put this in your:
    ~/.local/share/gedit/plugins

    You will need to create gedit and plugins directories

    The remove diacritics is under the edit menu; sorry it's not very pretty, but it works.

    EDIT: Requires gedit 3.xx and python 3

    strip_diacritics.tar.gz

    gedit1.jpggedit2.jpggedit3.jpg
    Last edited by slooksterpsv; March 25th, 2014 at 10:19 AM.
    Where's [slooksterpsv] been? - I had Catastrophic partition alignment failure. I lost 90%+ of my data, and just now got it back fixed and working.

  8. #18
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Lubuntu 14.10 Utopic Unicorn

    Re: Tweaks for Leafpad

    That's it. Official hero of the day
    Thanks much slooksterpsv!
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests by PM, thanks |

  9. #19
    Join Date
    Apr 2012
    Beans
    5,523

    Re: Tweaks for Leafpad

    ... fyi I managed to get something working in Leafpad on Ubuntu desktop by defining a custom keyboard shortcut (I used ctrl-shift-v similar to the Windows 'paste without formatting'), with the shortcut following command

    Code:
    sh -c 'xsel -bo | iconv -t ASCII//TRANSLIT | xsel -bi && xdotool getactivewindow key ctrl+v'
    I don't know how to define shortcuts in Openbox/LXDE

    Interestingly it *doesn't* appear to workin gedit (I think applications are free to reject XSendEvent events)

  10. #20
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Lubuntu 14.10 Utopic Unicorn

    Re: Tweaks for Leafpad

    Ah, you've already been my (secret) hero of the day steeldriver on other occasions, two in one day that is a lot
    I'm at work and not on my lubuntu install. I'll have a look tonight (late, sorry). Shift-ctrl-v already pastes without formatting on Ubuntu in Libreoffice, but that is handled by the application. The shortcut is also available system wide on MacOSX. There are ways to configure keyboard shortcuts on lubuntu.

    Edit :
    https://help.ubuntu.com/community/Lu...oard_shortcuts
    http://openbox.org/wiki/Help:Bindings
    http://crunchbanglinux.org/wiki/howt...oard_shortcuts
    https://wiki.archlinux.org/index.php/openbox#Keybinds
    Last edited by bapoumba; March 25th, 2014 at 03:52 PM.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests by PM, thanks |

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •