Re: [gedit-list] Encoding in mac version



At 18:59 +0000 9/6/11, tdiguy wrote:
>Greetings all--
>
>Been a gedit user for about 10 years now and have never, ever had a
>complaint or issue. Yesterday I got a not-very-computer-literate friend to
>install it on his Mac. (My wife, equally not-very-computer-literate has been
>using it for a year on her Mac with excellent results.) 
>
>However, when we tried to open an HTML page so he could edit it, we got an
>encoding error and a big red bar. I have never seen this before. There was a
>dropdown, and I don't remember the other option besides the default, but it
>did not open the file either.
>
>vi on his Mac read it prefectly. I opened and saved it in vi, hoping that
>might change some invisible encoding, but gedit still would not read it. the
>"File" command just showed it an HTML text file. 
>
>And now, on my Linux gedit I can open the file just fine. I was afraid that
>would happen.
>
>There may be some other Mac text editor (though the thing called texteditor
>on his Mac opens it as html, even when I change the extension to .txt) but
>gedit has served me so well for so long that I would really love to resolve
>this.
>
>Thanks so much!
>
>Jim Clark


It's a line-end problem.  I don't use gedit on my Macs but I have a terrible time reading a file created on a Mac using gedit on ubuntu.  For that I have to change Mac line ends - 0D - to UNIX ends - 0A. I really think gedit ought to make that easy but it doesn't.  Your browser treats both equally.

<ftp://ftp.macnauchtan.com/Software/LineEnds/>
<ftp://ftp.macnauchtan.com/Software/LineEnds/FixEndsFolder.sit>

Is some AppleScript drivel that allows analysis and change of line ends on a Mac. The source is included.

I'm sure vi can do it just as well as can sed or possibly tr on a Terminal session.  s/\r/\n/g is what I have committed to in a perl script on ubuntu. TextWrangler - free - from Bare Bones which sells bbedit will also make the change easily provided there are not mixed ends in the file. Here on Mac OS 9 I use MPW.

 I got told to upgrade to gedit 3 when I last complained on this list but I can't do that until gnome3 gets ported to ubuntu.
-- 

--> From the U S of A, the only socialist country that refuses to admit it. <--


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]