LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 07-04-2009, 01:45 AM   #1
AchubaNanoiaBR
LQ Newbie
 
Registered: Jun 2009
Location: So Paulo - Brazil
Distribution: Ubuntu
Posts: 5

Rep: Reputation: 0
Moving text files between Windows and Linux: Unicode and "executable" problems


Hi everyone, my first question here at LQ was a good start, but I figured it's already time for a second one ; ) .

So here's the thing. At my work place, I'm the only Linux user (Ubuntu 9, to be specific) and everyone else uses Windows XP. We have an organization process that involves a few .txt files exchanges during the end of day.

However, I live in Brazil we use several characters like "a, o, v" and the like. After some research, I found out I needed to use the same enconding for all my files, so I've set our Windows text editor to save everything in UTF-8, which is the enconding Gedit uses. But for some reason, that brings two problems:

1- Whenever I change between the two Operating Systems, the text enconding gets messed up, reading something like "cao^, c(4 small squares pictures, can't replicate at home :P)" etc. Both the original file and the copy reads as UTF-8, and this happens if I move the file from Windows to Linux and Linux to Windows;

2- Whenever I copy a file from Windows to Linux, each time I try to open it it will warn me that it is an executable program (which is not) and if should I display or run it. To avoid this, I have to manually go on properties and deselect the option "allow this to run as an executable" (or something similar).

Any suggestions on how to solve these two problems? Is it something I can do on the Windows or the Linux box? Any help would be appreciated and save me a few white hairs!
 
Old 07-04-2009, 02:36 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
In 2 - all files in windows are executable in the unix sense. Windows does not store permissions. You'll have to retroactively set the permissions when you load the files, or set the properties to just open them without asking.

From a nautilus window, select edit > preferences > behaviour - look down to "executable text files" and check "view when open".

1. try both ways with a utf8 text editor ...

note - there are different conventions used by linux and windows for handling text anyway.
 
Old 07-04-2009, 04:15 PM   #3
cmdln
Member
 
Registered: Apr 2009
Location: Lawrence, KS
Distribution: Debian, Centos
Posts: 102
Blog Entries: 1

Rep: Reputation: 24
It sounds lime you have two seperate issues. The executable issue can be fixed by modifying your samba config and using the force_mode option to ensure files do not get exec permissions.

Second, file encoding is different from the line ending issue. I think your line ending issue is related to dos mode files where gedit is wanting unix type files. You should be able to change this or run dos2unix to convert the text files. There is also unix2dos or tofrodos to help convert back and forth.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a "Bourne shell script text executable" installer be modified manually ? Libu Linux - Software 2 03-13-2009 06:09 AM
Lost option to "Open with text editor" executable script in 8.04 taylorkh Ubuntu 2 02-04-2009 10:49 AM
"list dynamic dependency" of an executable using command other than "ldd" Amrita@3086 Solaris / OpenSolaris 3 04-04-2007 04:56 AM
how can i see the "windows" files from linux red hat eltn10 Linux - General 3 09-29-2004 04:18 PM
why iam getting problems like "...too many files opened" or "segmentation fault" naren_0101bits Linux - Newbie 2 07-19-2004 12:20 PM


All times are GMT -5. The time now is 02:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration