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
  Help- converting file with pyton script grinleon 3 170 Yesterday, 11:48 AM
Last Post: grinleon
  Python Complete novice: Want to run a vulnerability script bhanney23 1 111 Sep-18-2020, 09:27 AM
Last Post: Aspire2Inspire
  Python script to only keep waypoints within x km from track? Winfried 0 118 Sep-18-2020, 08:47 AM
Last Post: Winfried
  python script to Batch File biprabu 1 119 Sep-09-2020, 01:49 PM
Last Post: jefsummers
  Pass by object reference when does it behave like pass by value or reference? mczarnek 2 181 Sep-07-2020, 08:02 AM
Last Post: perfringo
  svm script falahfakhri 3 282 Sep-03-2020, 06:17 AM
Last Post: bowlofred
  problem about slope in python script for bitcoin trading fisher_garry 1 361 Sep-02-2020, 01:39 PM
Last Post: fisher_garry
  Using a button to kill and restart a script duckredbeard 3 207 Sep-01-2020, 12:53 AM
Last Post: duckredbeard
  How to skip LinkedIn signup link using python script? Mangesh121 0 121 Aug-26-2020, 01:22 PM
Last Post: Mangesh121
  importing a list of numbers into python script barrypyth 8 372 Aug-22-2020, 09:10 PM
Last Post: barrypyth

Forum Jump:

Users browsing this thread: 1 Guest(s)