LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-20-2016, 03:07 AM   #1
Regnad Kcin
Member
 
Registered: Jan 2014
Location: Beijing
Distribution: Slackware 64 -current .
Posts: 663

Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Leafpad file save problem


Leafpad is a fast and convenient text editor in my work.
I use kate and nano for more complex or important text editing.
I got leafpad via sbopkg and first learned of it via playing with LXDE.

Recently on my slackware-64-current-multilib system,
when files are saved through leafpad, the first eight characters
are replaced with hexadecimal zeroes.

here is a test example. before is the file. after is the same file opened and saved with leafpad
its a simple file with two lines
Quote:
12345678
abcdefgh
Code:
bash-4.3$ hexdump before
0000000 3231 3433 3635 3837 610a 6362 6564 6766
0000010 0a68                                   
0000012
bash-4.3$ hexdump after
0000000 0000 0000 0000 0000 610a 6362 6564 6766
0000010 0a68                                   
0000012
I have activated scim and my setting in lang.sh is "export LANG=en_US.UTF-8"
which is the way I have been running for about 2 years now.

I don't find any report of this problem.
 
Old 02-20-2016, 03:18 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,118

Rep: Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192Reputation: 4192
FYI, scim is not activated here
Code:
$ set | grep LANG
LANG=en_US.UTF-8
$ echo "12345678" > before ; echo "abcdefgh" >> before
$ cp -a before after
$ leafpad after
File -> Save As -> (overwriting "after")
Code:
$ ls -la before after
-rw-r--r-- 1 myuser users 18 feb 20 10:13 after
-rw-r--r-- 1 myuser users 18 feb 20 10:13 before
$ diff -Naur before after                             
$ hexdump before                                      
0000000 3231 3433 3635 3837 610a 6362 6564 6766
0000010 0a68                                   
0000012
$ hexdump after 
0000000 3231 3433 3635 3837 610a 6362 6564 6766
0000010 0a68                                   
0000012
 
1 members found this post helpful.
Old 02-20-2016, 03:36 AM   #3
Regnad Kcin
Member
 
Registered: Jan 2014
Location: Beijing
Distribution: Slackware 64 -current .
Posts: 663

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Thanks for the quick response, ponce.

The way you show it working was how it worked for me up until recently.

To test the scim issue:

I turned scim off via
Quote:
chmod -x scim.sh
which inactivated scim but no other effects.

I have removed leafpad and reloaded it but it persists with this behaviour.
 
Old 02-20-2016, 04:00 AM   #4
Regnad Kcin
Member
 
Registered: Jan 2014
Location: Beijing
Distribution: Slackware 64 -current .
Posts: 663

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Smile deleted binary - fixed

I deleted the leafpad binary file in /usr/bin and reinstalled the package and it is working normally again now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iceweasel Browser Cannot save pages/ save any file/download Dhanraj C Linux - Newbie 2 07-22-2015 07:09 PM
Leafpad cursor vanishes on save Red Squirrel Linux - Software 2 07-14-2014 07:13 PM
[SOLVED] Leafpad doesn't save its options Mr. Alex Linux - Software 2 10-31-2010 05:07 AM
why can't Leafpad open a file that is a K menu entry? newbiesforever Linux - Software 1 10-29-2008 11:34 PM
The problem of "Save As" on Leafpad satimis Linux - Software 0 08-18-2007 03:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration