Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Cant pass corect variables to python script in bash script
Hi im not familiar with python, I have som strange problem.

I have a bash script for example


/usr/bin/python3.4 /home/my/ "$1"

If I call script directly from command line as /usr/bin/python3.4 /home/my/ "ťčšťčš" it works

If a call script from commandline: "ťčšťčš" it not works

if im using only English chars it works in argument.. problem is only with non-English chars.

How to debug this ? Please help..
Im think everythink is Unicode... so bash is Unicode friendly python 3 is too .. I have no idea where is the problem ... sorry for my English..

sorry my mistake... ist a bit complicated...

Runing bash script works...

I wish use that bash script in sieve filter... so sieve passing utf8 encoded variables to bash and bash passint it to python... with only english chars it is ok.. but passing non english is buggy it

please delete this thread
I don't know for bash but it depends on the terminal emulator you are using. If it is not support utf-8, bash can't do anything.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
It depends on the encoding used in the bash script file. It should match the one defined in your locale. Issue the "locale" command. It will list several environment variables (the important one is LANG). The last element of these variables (after the dot) is the encoding used by default on your system. Make sure your editor uses it.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs:
Not sure, but I'm guessing the utf is the culprit. Just for chuckles, try copying the file
to one with an ASCII name like 'abc' and see if that will work

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Pyautogui script runs fine if split into two parts together it does not Bmart6969 1 77 Oct-07-2019, 10:53 PM
Last Post: Bmart6969
  Python script modification rajannn 1 116 Oct-06-2019, 07:55 PM
Last Post: micseydel
  convert sh script to python script Reims 0 73 Oct-01-2019, 12:10 PM
Last Post: Reims
  how to set focus when running a script using subprocess Malt 0 95 Sep-26-2019, 08:07 AM
Last Post: Malt
  Python script dioesn`t run all commands exploit123 5 161 Sep-25-2019, 03:15 PM
Last Post: snippsat
  Multiple start of script dev1755 2 137 Sep-22-2019, 10:44 PM
Last Post: dev1755
  PYTHON Script ERROR Help Need alex9745 3 174 Sep-17-2019, 08:37 AM
Last Post: alex9745
  Change mouse move speed in guibot script rulltartan 0 72 Sep-09-2019, 09:26 PM
Last Post: rulltartan
  Python thread script gets defunct state xq10907 0 86 Sep-06-2019, 02:02 AM
Last Post: xq10907
  Python Script for parsing dictionary values from yaml file pawan6782 3 199 Sep-04-2019, 07:21 PM
Last Post: pawan6782

Forum Jump:

Users browsing this thread: 1 Guest(s)