bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: bug report^2 on GREP


From: Stepan Kasal
Subject: Re: bug report^2 on GREP
Date: Wed, 16 Jul 2003 14:33:35 +0200
User-agent: Mutt/1.2.5.1i

Dear Dr. Kaminishi Toshio,

On Wed, Jul 16, 2003 at 07:16:31PM +0900, ?$B>e@>!!=SM:?(B wrote:
> I understand Windows 98 supports euc and utf8 besides shift-jis, but my
> favorite editor can handle only shift-jis or perhaps I don't know how to
> set it up correctly.
> Most filter-type tools I use are also confined to shift-jis data.

thank you for this information.

> I don't know the concept of ``export'', for what I know about run-time
> setting is ``enviroment variable'' only.

Each process has it own set of environment variables (this is true both
for Unix and for DOS derived systems, like Windows).
When a new process is started, the set of env. variables is copied from
the parent process.  In Windows, the whole set is copied.
In Unix, only the variables marked as ``exported'' are copied to the
child process' environment.

So in Unix, you have to set the variable and also mark it as exported,
eg. this way:
        LC_ALL=japanese.sjis
        export LC_ALL

In bash, you can use the shortcut I suggested to you:

>       export LC_ALL=japanese.sjis

> What I like to do is: Starting from COMMAND PROMPT, skip ``bash'' and
> run ``grep'' directly under ``dos'' prompt. To me, Cygwin Windows is a
> little despotic in that the directories outside of Cygwin cannot be
> reached.

Cygwin is a Unix-like environment running Windows.  The advantage is that
you can compile and use programs written for Unix without big work.

The disadvantage is that the emulation of one environment within another
may look weird.  Using Cygwin may be tricky even for people who are
familiar both with Unix and Cygwin.

For example, to access files from C:\windows, you can type (in bash
prompt), either

        cd c:/windows

(note the forward slash, not backslash), or

        cd /cygdrive/c

or you can use mount and umount, similarily as in Unix.

Back to your problem with grep:
I'm afraid that there is a problem in the main sources of grep.
So I'll start by trying to fix the problem in Unix.  Once I'm sure
that it works, I'll also test it under Cygwin.
When I succeed with this, I'll write you again.

I apologize that I cannot promise you whether/when the solution will
be ready.  I'm working on GNU grep as a volunteer, in spare time only.
And as I have no experience with multibyte character sets, I'll have to
ask other people for help.

Other ways you might try:
1) various cygwin help lists
2) http://gnuwin32.sourceforge.net  (another effort to port GNU tools
   to windows)

But if I'm true and this is a bug in the main source, contacting the
people which work on porting the tools to Windows won't help much.

Other possibility would be to find a contact to Japanese programmers
which work with Cygwin or just with any other GNU environment, eg.
GNU/Linux.

In case you decide to evaluate these possibilities and you find a
solution, I'll be glad to hear about it from you.

With kind regards,
        Stepan Kasal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]