Re: Correct wrong character set?

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

 



On Fri, 2010-04-16 at 10:20 -0500, cnbiz850 wrote:
> The Windows program I am running with Wine provides an editor of its
> own.  I need to use that because only it then can save into the
> proprietary (non-ASCII) format the program needs to use.
>
Yes, I understood that, but not how the editor is launched: is it
launched by the program that needs the special file content or
separately? 

If the latter, my script suggestion might help. As an example, this
(tested) script normally edits the file with gedit but if the file is in
$HOME/utils/scripts it uses vi. The magic on line 6 works because
"readlink -f" returns the absolute name of the file and dirname chops
off the file name, leaving just the directory path:

========================= tricked ==============================
#!/bin/bash
if [ -z "$1" ]
then
        gedit $1
else
        path=$(dirname $(readlink -f $1))
        if [ "$path" == "$HOME/utils/scripts" ]
        then
                vi $1
        else
                gedit $1
        fi
fi
====================== end of tricked ==============================

It runs vi regardless of whether you type something like:

	tricked utils/scripts/installscript

or this:

        cd utils/scripts
        tricked installscript

It does the same regardless of whether you're using the editor to create
a new file or edit an existing one. 

If no filename is given it always runs gedit.

> I hope if there is a way for me to use the Linux keyboard to type
> correctly into the program's editor.
> 
Why not? AFAIK the keyboard generates the same output regardless of
whether the keystroke consumer is a Linus program or a Windows program
running under wine.


Martin





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux