Setting locale in a script problem
by Davno from LinuxQuestions.org on (#57QQF)
Hi,
I have this script that i use to split and convert ".flac files" using a .cue file.
The problem is that if the .cue files contains any characters like (a, e, u, e, a, e, ect...) from the french language, the script will ignore the lines with those characters.
The script begin like this:
Code:#!/usr/bin/python
#-*- coding: utf-8 -*-
import gtk
import threading
import subprocess
from string import find
import time
import sys
import gettext
import locale
import pango
import getopt
import gobject
import urllib
import re
from config import *
from decoder import *
import preference as preferenceI suspect that is has to do with the "import locale" section of that script, so i guess if my linux install was in french i would not have that problem.
Can you see a solution to make the script work with those characters.
Right now i modified by hand the .cue files every time and it's very time consuming.
Thank You.


I have this script that i use to split and convert ".flac files" using a .cue file.
The problem is that if the .cue files contains any characters like (a, e, u, e, a, e, ect...) from the french language, the script will ignore the lines with those characters.
The script begin like this:
Code:#!/usr/bin/python
#-*- coding: utf-8 -*-
import gtk
import threading
import subprocess
from string import find
import time
import sys
import gettext
import locale
import pango
import getopt
import gobject
import urllib
import re
from config import *
from decoder import *
import preference as preferenceI suspect that is has to do with the "import locale" section of that script, so i guess if my linux install was in french i would not have that problem.
Can you see a solution to make the script work with those characters.
Right now i modified by hand the .cue files every time and it's very time consuming.
Thank You.