Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Mac Applications / June 2008



Tip: Looking for answers? Try searching our database.

Text Juggling - TextEdit / vi / unix

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gtr - 05 Jun 2008 02:12 GMT
I have a file I cull from a web page.  It has kana/kanji in Japanese
that reads fine.  A few example lines:

001 1935E Tatsuzō Ishikawa for 蒼氓 Sōbō
003 1936E Oda Takeo for 城外 Jyōgai
003 1936E Tsuruta Tomoya for コシャマイン記 Koshamain ki

I paste it into TextEdit to save.  It looks fine. I can paste it into
Pages just fine.

I want to manipulate it a bit and load the file into vi, where again
the kana/kanji looks fine.  I edit some of it.  I save it.  I list it
to the screen via the unis "head" command.  Looks fine.

But if I now if I look at it on screen via flow the kana/kanji it new
newly save file looks gimpled.  Additionally if I load it into either
TextEdit or Pages it is gimped there and looks like this:

001zzz1935EzzzTatsuzō Ishikawa for 蒼氓 Sōbō
003zzz1936EzzzOda Takeo for 城外 Jyōgai
003zzz1936EzzzTsuruta Tomoya for コシャマイン記 Koshamain ki

I realize that BOTH of these probably look gimped for some newsreaders.
My issue seems to be that vi doesn't really save the file I loaded as
is.  I just loaded the original un-gimped text file in vi and saved it
without modification. And it seems to be permanantely gimped for all
but the unix environment.

I was forced to cat the whole damn modified file to the screen in unix,
copy it and paste THAT into Pages to get where I wanted to go. What a
nuisance.

Any help on how to avoid that with juggling text formats in unix¿
Signature

Thank you and have a nice day.

gtr - 06 Jun 2008 15:46 GMT
> I have a file I cull from a web page.  It has kana/kanji in Japanese
> that reads fine.  A few example lines:
[quoted text clipped - 30 lines]
>
> Any help on how to avoid that with juggling text formats in unix¿

No ideas?  Nothing?
Signature

Thank you and have a nice day.

william mitchell - 06 Jun 2008 17:12 GMT
[describes problem in vi with a file having japanese characters.]

I seldom use vi, and even in Emacs I have little experience with
encodings, and none with Japanese.   However if, in Vi, you type
":help multbyte" you should be able to find out how encodings are
handled in Vi (actually in Vim, which is imitating Vi in OS X).
gtr - 06 Jun 2008 18:35 GMT
>  [describes problem in vi with a file having japanese characters.]
>
> I seldom use vi, and even in Emacs I have little experience with
> encodings, and none with Japanese.   However if, in Vi, you type
> ":help multbyte" you should be able to find out how encodings are
> handled in Vi (actually in Vim, which is imitating Vi in OS X).

One of two potential problems: Not enough info, or too much info!  In
this case, the latter.  Thanks for the pointer, but this info is quite
daunting.

I am just confused by it's ability to both retain it's accuracy for
dispaly to the screen in vi, but corrupt it transparently for any other
use.  Strange.
Signature

Thank you and have a nice day.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.