hubertcampan Posted April 16, 2013 Posted April 16, 2013 Hi all, I've have some problems with determining the locals language in bash script in workflows in Alfred2. I'm on OSX 10.7.5 FR. My script : DATE=$(echo "{query}" | sed -e's/HAEC/CEST/g' -e's/HNEC/CET/g'); export LC_TIME="fr_FR.UTF-8"; date -jf "%d %B %Y %T %Z" "$DATE" "+%Y%m%d%H%M%S" I use it : Select a text date (i.e. : "18 décembre 2006 19:24:12 HNEC"), use my hotkey to launch Alfred2/Workflow/Bashscript Problem : Works • In Alfred2 when month has NO accented character (i.e. : "18 janvier 2006 19:24:12 HNEC") • In terminal as is with or without month with accented characters Does NOT work • In Alfred2 when month has accented character Note : I had to add 'export LC_TIME="fr_FR.UTF-8"' as I assume Alfred bash script works in EN. It didn't work with french dates even though my whole system is in french and it DOES work in terminal without the export command. Also, I had to "translate" HAEC and HNEC as date command doesn't understand this frenchified CEST and CET. Any ideas on how I can bypass this problem ? Is it a bug ? Thanks in advance ! Hubert
Andrew Posted April 16, 2013 Posted April 16, 2013 I've replied to your previous thread - not sure how that one got missed. Going to move this to closed to keep Alfred's bug thread focused.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now