WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Suggestion for Leafpad  (Read 4928 times)

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Suggestion for Leafpad
« on: February 04, 2010, 10:27:33 AM »
Here are some minor suggestions for Leafpad. They are not high priority or urgent, just whenever Leafpad is updated.

1. When saving a new file, have it default to UTF-8.

2. Have word wrap on by default.
Many people see what is. Some people see what can be, and make a difference.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Suggestion for Leafpad
« Reply #1 on: February 04, 2010, 10:52:19 AM »
As I use leafpad to edit scripts and source files, I personally would rather not have word wrap on by default.

I will look into supporting utf-8 by default as that would give support for other languages without having to specify utf-8 when saving a file. 

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Suggestion for Leafpad
« Reply #2 on: February 04, 2010, 11:38:27 AM »
As I use leafpad to edit scripts and source files, I personally would rather not have word wrap on by default.

I will look into supporting utf-8 by default as that would give support for other languages without having to specify utf-8 when saving a file. 

BTW, if I'm not wrong, default encoding in TC 2.x is ISO-8859-1. I would appreciate UTF-8 default in 3.x
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Suggestion for Leafpad
« Reply #3 on: February 04, 2010, 12:12:40 PM »
BTW, if I'm not wrong, default encoding in TC 2.x is ISO-8859-1. I would appreciate UTF-8 default in 3.x

Are you talking about filenames, fonts, or?
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Suggestion for Leafpad
« Reply #4 on: February 04, 2010, 12:16:31 PM »

Are you talking about filenames, fonts,


Yes
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Suggestion for Leafpad
« Reply #5 on: February 04, 2010, 01:16:06 PM »
UTF-8 filenames are already supported, but we don't include the fonts, nor the gconv conversion libs.

Could be done, but would be a lot of added size with little benefit IMHO.


If the user wishes to have them, all it takes is three extensions:
- gconv
- any of the TTF fonts
- a file manager / terminal using that ttf font
edit: Okay, four, an utf-8 locale is also needed.
« Last Edit: February 04, 2010, 01:21:32 PM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Suggestion for Leafpad
« Reply #6 on: February 04, 2010, 01:20:59 PM »
Well, it depends on what TC/MC is used for and in which environment. But that's fine, Keep It Small and Flexible.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Suggestion for Leafpad
« Reply #7 on: February 04, 2010, 02:24:43 PM »
I have only a little experience in non-english locales and fonts, etc, so thanks Curaga for the input of what has to be done to make use of utf-8.  It would be simple to hack the source of leafpad to default to utf-8 without having to include a default config file in the extension, since I don't like including ~/.config files in extensions.  But since extra extensions and/or environment settings are required to make use of other languages, choosing utf-8 when saving a leafpad document and then backing up your leafpad config file to persist is only one more simple step for the user.  Therefore, the current state of leafpad seems ideal.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Suggestion for Leafpad
« Reply #8 on: February 05, 2010, 02:20:28 AM »
I use English.

When I come across information on something I haven't learnt yet, sometimes related to Tiny Core, sometimes on other subjects, I often copy and paste the key points to a text document using Leafpad. When I want that information, it is there in the text file.

I have found, many things I copy and paste in English, can not be saved until I change to utf8 in Leafpad.

Quote
It would be simple to hack the source of leafpad to default to utf-8

I would like to see that done next time Leafpad is updated. It would save a step each time something is saved in Leafpad.
Many people see what is. Some people see what can be, and make a difference.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Suggestion for Leafpad
« Reply #9 on: February 05, 2010, 08:15:03 PM »
Looking at the source, leafpad detects the encoding environment when opening a file or saving.  It would not be trivial to make it default to utf-8. 

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Suggestion for Leafpad
« Reply #10 on: February 10, 2010, 09:05:19 AM »
It is a good idea to detect encoding when opening a file. That should stay like that.

However, when creating a new file, it would be nice if it defaulted to utf-8.


When creating a new file in Leafpad in Parted Magic, it defaults to utf-8. I don't know whether you have time to check out how it is done in Parted Magic.


This is not high priority. However, if you have it in your mind, and at some time in the future you update Leafpad, you may have the opportunity. It is not essential, but would be nice.
Many people see what is. Some people see what can be, and make a difference.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Suggestion for Leafpad
« Reply #11 on: February 10, 2010, 09:12:47 AM »
If there is a configure switch to enable that then I will do it.  But the defaulting to uft-8 in parted magic may be due to it's default system encoding.