Mailing List Archive

Support open source code!


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

Re: tlug: msword files



"Stephen J. Turnbull" wrote:
>     Hirotaka> Can we write a SJIS version of 'strings'?
> 
> No.  strings(1) simply (1) checks for object/library files, and if so
> uses libbfd to find the data, if not takes the whole file and (2)
> scans it byte-by-byte using isprint() and spits out sequences of 4
> bytes or more that are printable.  Even if we had a POSIX locale for
> Japan, which we don't, really, the byte-oriented-ness would screw this
> idea.  Not to mention the fact that since MS saw fit to pack GR with
> the half-wit kana, most executables are going to be about 70-80%
> printable outside of the string data.

Thanks for the information.

I know isprint() does not understand SJIS. Now can we hack the code
fragment
which accepts one SJIS character? Of course we need to look ahead one
byte to test if the byte sequence is a valid SJIS character.

> Ie, a non-ASCII version of strings must know a lot more about file
> structure; for Shimpei's application you really need to know what a MS
> Word file looks like, and even MS Word doesn't know that from one
> version to the next; I doubt you'll find anybody to maintain a version
> of strings that handles shift JIS.

Does anybody send me the source code of 'strings'? I suppose
it is not a large program.

>     Hirotaka> Can we write a SJIS version of 'strings'?
> No.  

I think 'no' is too strong word but not impossible. You need to make
some dirty hack :-)

Regards,
  Hiro
-- 
Hiro Yoshioka/Principal Engineer
mailto:hyoshiok@example.com (office)
http://www.best.com/~yoshioka/d/98/
The statements, views and opinions expressed here are my own 
and do not necessarily represent those of Oracle Corporation
-------------------------------------------------------------------
Next Technical Meeting: October 9 (Sat), 13:30   place: Temple Univ.
* Linux Internationalisation Initiative (Li18nux) speaker: Akio Kido
* Japanese TrueType Fonts                     speaker: Adrian Havill
Next Technical Meeting: November 13 (Sat), 13:30 place: Temple Univ.
* Network Security                               speaker: Steve Baur
Next Nomikai:  December 17 (Fri), 19:00 Tengu TokyoEkiMae 03-3275-3691
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links