Search Results

Search found 76 results on 4 pages for 'setlocale'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Why can't I change the AU_AU locale to en_US?

    - by sachin
    /bin/bash: warning: setlocale: LC_ALL: cannot change locale ( (unset)) Generating locales... en_US.ISO-8859-1... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done Generation complete. ganesha@ubuntu:~$ sudo update_locale LANG=en_US sudo: update_locale: command not found ganesha@ubuntu:~$ sudo update-locale LANG=en_US perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US:en", LC_ALL = " (unset)", LC_PAPER = "AU_AU.UTF-8", LC_ADDRESS = "AU_AU.UTF-8", LC_MONETARY = "AU_AU.UTF-8", LC_MEASUREMAUT = "AU_AU.UTF-8", LC_NUMERIC = "AU_AU.UTF-8", LC_TELEPHONE = "AU_AU.UTF-8", LC_MESSAGES = "AU_AU.UTF-8", LC_COLLATE = "AU_AU.UTF-8", LC_IDAUTIFICATION = "AU_AU.UTF-8", LC_CTYPE = "AU_AU.UTF-8", LC_TIME = "AU_AU.UTF-8", LC_NAME = "AU_AU.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). ganesha@ubuntu:~$ sudo update-locale LANG=en_US.UTF8 perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US:en", LC_ALL = " (unset)", LC_PAPER = "AU_AU.UTF-8", LC_ADDRESS = "AU_AU.UTF-8", LC_MONETARY = "AU_AU.UTF-8", LC_MEASUREMAUT = "AU_AU.UTF-8", LC_NUMERIC = "AU_AU.UTF-8", LC_TELEPHONE = "AU_AU.UTF-8", LC_MESSAGES = "AU_AU.UTF-8", LC_COLLATE = "AU_AU.UTF-8", LC_IDAUTIFICATION = "AU_AU.UTF-8", LC_CTYPE = "AU_AU.UTF-8", LC_TIME = "AU_AU.UTF-8", LC_NAME = "AU_AU.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). ganesha@ubuntu:~$ gedit ~/.profile (process:6467): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. ganesha@ubuntu:~$ sudo update-locale LANG=en_US.UTF8 perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US:en", LC_ALL = " (unset)", LC_PAPER = "AU_AU.UTF-8", LC_ADDRESS = "AU_AU.UTF-8", LC_MONETARY = "AU_AU.UTF-8", LC_MEASUREMAUT = "AU_AU.UTF-8", LC_NUMERIC = "AU_AU.UTF-8", LC_TELEPHONE = "AU_AU.UTF-8", LC_MESSAGES = "AU_AU.UTF-8", LC_COLLATE = "AU_AU.UTF-8", LC_IDAUTIFICATION = "AU_AU.UTF-8", LC_CTYPE = "AU_AU.UTF-8", LC_TIME = "AU_AU.UTF-8", LC_NAME = "AU_AU.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). ganesha@ubuntu:~$ sudo apt-get install --reinstall locales Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/3359 kB of archives. After this operation, 0 B of additional disk space will be used. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US:en", LC_ALL = " (unset)", LC_TIME = "AU_AU.UTF-8", LC_MONETARY = "AU_AU.UTF-8", LC_CTYPE = "AU_AU.UTF-8", LC_COLLATE = "AU_AU.UTF-8", LC_ADDRESS = "AU_AU.UTF-8", LC_TELEPHONE = "AU_AU.UTF-8", LC_MESSAGES = "AU_AU.UTF-8", LC_NAME = "AU_AU.UTF-8", LC_MEASUREMAUT = "AU_AU.UTF-8", LC_IDAUTIFICATION = "AU_AU.UTF-8", LC_NUMERIC = "AU_AU.UTF-8", LC_PAPER = "AU_AU.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). (Reading database ... 157848 files and directories currently installed.) Preparing to replace locales 2.13+git20120306-3 (using .../locales_2.13+git20120306-3_all.deb) ... Unpacking replacement locales ... Processing triggers for man-db ... Setting up locales (2.13+git20120306-3) ... /bin/bash: warning: setlocale: LC_ALL: cannot change locale ( (unset)) Generating locales... en_AG.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_AU.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_BW.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_CA.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_DK.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_GB.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_HK.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_IE.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_IN.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_NG.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_NZ.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_PH.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_SG.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_US.ISO-8859-1... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_US.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_ZA.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_ZM.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done en_ZW.UTF-8... /usr/sbin/locale-gen: line 177: warning: setlocale: LC_ALL: cannot change locale ( (unset)) done Generation complete. ganesha@ubuntu:~$ How to correct this?

    Read the article

  • Equivalent of PHP setlocale in an APACHE config file

    - by Nicolas
    I need to display a date in french locale. A solution is to use setlocale(LC_TIME, 'fr_FR'); But I'm looking to set the locale directly in the configuration of my apache server. In the /etc/httpd/conf/httpd.conf file, I tried <VirtualHost *:80> ... SetEnv LC_TIME 'fr_FR' </VirtualHost> without any effect. In which php or apache configuration file should I define the LC_TIME variable?

    Read the article

  • setlocale/strftime issue

    - by Manos Dilaverakis
    I am using the following to output the full name of a month in Greek. setlocale(LC_TIME, 'el_GR'); strftime("%B"); This works, except the output string is ISO-8859-7 (greek code page), which is a problem since I need a UTF-8 string. I could put this through iconv to convert it, but I was wondering if there was a way to do that without resorting to an extra function. Could you somehow tell strftime to output a UTF-8 string in this case?

    Read the article

  • setlocale to fr-FR in PHP and number formatting

    - by bateman_ap
    Hi, I am trying to create a French version of one of my sites. I have set setlocale(LC_ALL, 'fr_FR'); at the top of my page, and using strftime I am displaying dates correctly in the French style. However I am having some problems with a number. Part of the page uses data I am getting from a Web Service. I am assigning a returned value to a var like this: $overallRating = $returnArray['Overall']; I am then using the following code later to format it to 1 decimal place number_format($overallRating,1) In the English version the overallRating value might be 7.5 and returns a value such as 7.5 (the reason for running it through the number_format is if it returns 7 I want it to display 7.0) However in the French version if I print out the raw $overallRating value I get 7,5 which looks like it has translated it into french. This would be fine but if I run it through number_format I get the error: Notice: A non well formed numeric value encountered in /sites/index.php on line 250 Line 250 is the number_format line I presume the translation to 7,5 is messing it up, but not sure how to solve this... Using PHP 5.3 in case there is anything new that helps me

    Read the article

  • NSDateFormatter - set device language as locale?

    - by Emil
    Hey. I'm trying to get the iPhone to display dates formatted by an NSDateFormatter in the current device language. I have tried setLocale:[NSLocale currentLocale], but that only returns 5 instead of May (or Mai, as I want it to be). Any help is appreciated. Thanks! :)

    Read the article

  • How can I play .bin file with VLC?

    - by freebird
    For two days I have tried to get vlc play this .bin file. I played it fine in windows xp using vlc. So I decided to install same vlc thats on my xp partition and it plays through Wine the file no problem. Why won't it play natively? fr33bird@fr33bird-desktop:~/Downloads/********/*********$ vlc ********.bin VLC media player 1.1.10 The Luggage (revision exported) Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS") Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE") [0x8387914] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. Blocked: call to setlocale(6, "") Warning: call to srand(1309627174) Warning: call to rand() Blocked: call to setlocale(6, "") (process:14474): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. Blocked: call to setlocale(6, "") libdvdnav: Using dvdnav version 4.1.3 libdvdread: Using libdvdcss version 1.2.10 for DVD access libdvdread: Can't stat /home/fr33bird/Downloads/*******/*******/*******.bin No such file or directory libdvdnav: vm: failed to open/read the DVD [0x87034e4] filesystem access error: cannot open file /home/fr33bird/Downloads/*****/*****/*******.bin (No such file or directory) [0x843535c] main input error: open of `file:///home/fr33bird/Downloads/******/****/********.bin' failed: (null) Funny it says no such file even thou it's attempting to read it. Xine says that the .bin is encrypted so I installed libdvdcss2 w32codecs ubuntu-restricted-codecs from Medibuntu still same issue. How can I fix this? I want to run this natively not through wine. I Even tried to change .bin to .mpg and .avi.

    Read the article

  • Zend_Translate scan translation files

    - by nute
    I've trying to use Zend_Translate from Zend Framework I am using "POEdit" to generate "gettext" translation files. My files are under /www/mysite.com/webapps/includes/locale (this path is in my include path). I have: pictures.en.mo pictures.en.po (I plan on having pictures.es.mo soon) It all works fine if I manually do addTranslation() for each file. However I want to use the automatic file scanning method. I tried both of those: <?php /*Localization*/ require_once 'Zend/Translate.php'; require_once 'Zend/Locale.php'; define('LOCALE','/www/mysite.com/webapps/includes/locale'); if(!empty($_GET['locale'])){ $locale = new Zend_Locale($_GET['locale']); } else{ $locale = new Zend_Locale(); } $translate = new Zend_Translate('gettext', LOCALE, null, array('scan' => Zend_Translate::LOCALE_FILENAME)); if ( $translate->isAvailable( $locale->getLanguage() ) ){ $translate->setLocale($locale); } else{ $translate->setLocale('en'); } And this: <?php /*Localization*/ require_once 'Zend/Translate.php'; require_once 'Zend/Locale.php'; define('LOCALE','/www/mysite.com/webapps/includes/locale'); if(!empty($_GET['locale'])){ $locale = new Zend_Locale($_GET['locale']); } else{ $locale = new Zend_Locale(); } $translate = new Zend_Translate('gettext', LOCALE); if ( $translate->isAvailable( $locale->getLanguage() ) ){ $translate->setLocale($locale); } else{ $translate->setLocale('en'); } In both cases, I get a Notice: No translation for the language 'en' available. in /www/mysite.com/webapps/includes/Zend/Translate/Adapter.php on line 411 It also worked if I tried to do directory scanning.

    Read the article

  • UnsupportedEncodingException thrown when using Resin and Grails

    - by knorv
    I've encountered a strange problem in a Grails webapp running under Grails: java.io.UnsupportedEncodingException is thrown quite frequently due to various unknown encoding strings (such as "ISO8859_10", "ISO-8859-10"), and the strange thing is that this is done entirely within the Resin and Grails code. That is - no custom code is involved when the exception is thrown. I'm not sure if it is Grails or the servlet container's code that should handle the exception. But I'd assume that the exception should be handled somewhere and not bubble up all the way to stderr. This is the exception in full: java.io.UnsupportedEncodingException: ISO-8859-10 at com.caucho.vfs.i18n.JDKWriter$OutputStreamEncodingWriter.<init>(JDKWriter.java:112) at com.caucho.vfs.i18n.JDKWriter.create(JDKWriter.java:79) at com.caucho.vfs.Encoding.getWriteEncoding(Encoding.java:231) at com.caucho.server.connection.ToByteResponseStream.setEncoding(ToByteResponseStream.java:137) at com.caucho.server.connection.AbstractHttpResponse.setLocale(AbstractHttpResponse.java:1683) at com.caucho.server.connection.HttpServletResponseImpl.setLocale(HttpServletResponseImpl.java: 115) at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:139) at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:139) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1035) at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:290) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552) at javax.servlet.http.HttpServlet.service(HttpServlet.java:114) My questions: Should the exception be handled? If so, is it the responsibility of the servlet container (Resin) or the web framework (Grails)? How would you go about solving this? (I'd rather not having the exception log cluttered with exceptions that I can do nothing about.)

    Read the article

  • case-insensitive regexp match on non-english text in perl cgi script

    - by jonny
    ok. I have list of catalog paths and need to filter out some of them. Match pattern comes in non-Unicode encoding. Tried following: require 5.004; use POSIX qw(locale_h); my $old_locale = setlocale(LC_ALL); setlocale(LC_ALL, "ru_RU.cp1251"); @{$data -> {doc_folder_rights}} = grep { $_->{doc_folder} =~/$_REQUEST{q}/i; # catalog path pattern in $_REQUEST{q} } @{$data -> {doc_folder_rights}}; setlocale(LC_ALL, $old_locale); What I need is case-insensitive regexp pattern matching when pattern contains russsian letters.

    Read the article

  • How can I make a case-insensitive regexp match for Russian letters?

    - by jonny
    I have list of catalog paths and need to filter out some of them. My match pattern is in a non-Unicode encoding. I tried the following: require 5.004; use POSIX qw(locale_h); my $old_locale = setlocale(LC_ALL); setlocale(LC_ALL, "ru_RU.cp1251"); @{$data -> {doc_folder_rights}} = grep { # catalog path pattern in $_REQUEST{q} $_->{doc_folder} =~/$_REQUEST{q}/i; } @{$data -> {doc_folder_rights}}; setlocale(LC_ALL, $old_locale); What I need is case-insensitive regexp pattern matching when pattern contains russsian letters.

    Read the article

  • VLC tv card streaming

    - by Franco
    I'm trying to stream the output of my desktop's tv card to my laptop using vlc without success. I have on both pcs ArchLinux installed. I'm stuck here: $ cvlc v4l2:///dev/video0:norm=pal-nc:frequency=543250:size=640x480:channel=0:input-slave=alsa:///dev/dsp:audio=0 --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace}:standard{access=http,mux=ogg,dst=192.168.0.2:8080}' --ttl 12 VLC media player 1.1.4 The Luggage (revision exported) Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS") Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE") [0x1c9e480] inhibit interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed. [0x1c9e480] main interface error: no suitable interface module [0x1ca1500] main interface error: no suitable interface module [0x1bb3120] main libvlc error: interface "globalhotkeys,none" initialization failed [0x1c9f940] dummy interface: using the dummy interface module... [0x1ca4850] main access out: creating httpd [0x1ebb340] mux_ogg mux: Open And on my laptop: $ vlc http://192.168.0.2:8080 VLC media player 1.1.4.1 The Luggage (revision exported) Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS") Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE") Blocked: call to setlocale(6, "") Blocked: call to sigaction(17, 0xb25c7058, 0xb25c70e4) Warning: call to signal(13, 0x1) Warning: call to signal(13, 0x1) Blocked: call to setenv("ORBIT_SOCKETDIR", "/tmp/orbit-zf", 1) Warning: call to srand(1287690122) Warning: call to rand() Blocked: call to setlocale(6, "") (process:17933): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. Warning: call to signal(13, 0x1) Blocked: call to setlocale(6, "") [0x8af5f04] main stream error: cannot pre fill buffer Any idea why this isn't working?

    Read the article

  • How to display locale sensitive time format without seconds in python

    - by Tim Kersten
    I can output a locale sensitive time format using strftime('%X'), but this always includes seconds. How might I display this time format without seconds? >>> import locale >>> import datetime >>> locale.setlocale(locale.LC_ALL, 'en_IE.utf-8') 'en_IE.utf-8' >>> print datetime.datetime.now().strftime('%X') 12:22:43 >>> locale.setlocale(locale.LC_ALL, 'zh_TW.utf-8') 'zh_TW.utf-8' >>> print datetime.datetime.now().strftime('%X') 12?22?58? The only way I can think of doing this is attempting to parse the output of locale.nl_langinfo(locale.T_FMT) and strip out the seconds bit, but that brings it's own trickery. >>> print locale.nl_langinfo(locale.T_FMT) %H?%M?%S? >>> locale.setlocale(locale.LC_ALL, 'en_IE.utf-8') 'en_IE.utf-8' >>> print locale.nl_langinfo(locale.T_FMT) %T

    Read the article

  • How to read.table with "Hebrew" column names (in R)?

    - by Tal Galili
    Hi all, I am trying to read a .txt file, with Hebrew column names, but without success. I uploaded an example file to: http://www.talgalili.com/files/aa.txt And am trying the command: read.table("http://www.talgalili.com/files/aa.txt", header = T, sep = "\t") This returns me with: X.....ª X...ª...... X...œ.... 1 12 97 6 2 123 354 44 3 6 1 3 Instead of: ??? ????? ???? 12 97 6 123 354 44 6 1 3 My output for: l10n_info() Is: $MBCS [1] FALSE $`UTF-8` [1] FALSE $`Latin-1` [1] TRUE $codepage [1] 1252 And for: Sys.getlocale() Is: [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252" Can you suggest to me what to try and change to allow me to load the file correctly ? Update: Trying to use: read.table("http://www.talgalili.com/files/aa.txt",fileEncoding ="iso8859-8") Has resulted in: V1 1 ? Warning messages: 1: In read.table("http://www.talgalili.com/files/aa.txt", fileEncoding = "iso8859-8") : invalid input found on input connection 'http://www.talgalili.com/files/aa.txt' 2: In read.table("http://www.talgalili.com/files/aa.txt", fileEncoding = "iso8859-8") : incomplete final line found by readTableHeader on 'http://www.talgalili.com/files/aa.txt' While also trying this: Sys.setlocale("LC_ALL", "en_US.UTF-8") Or this: Sys.setlocale("LC_ALL", "en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8") Get's me this: [1] "" Warning message: In Sys.setlocale("LC_ALL", "en_US.UTF-8") : OS reports request to set locale to "en_US.UTF-8" cannot be honored Any suggestion or clarification will be appreciated. Best, Tal

    Read the article

  • meld on OS X 10.7 doesn't work?

    - by klm123
    I'm installing meld on Mac OS 10.7 using port. It has downloaded all dependencies and told that everything is ok: Staging meld into destroot Installing meld @1.5.3_0 Activating meld @1.5.3_0 Cleaning meld Updating database of binaries: 100.0% Scanning binaries for linking errors: 100.0% No broken files found. but when I run: [18:28:24]~$ meld Traceback (most recent call last): File "/opt/local/bin/meld", line 75, in <module> locale.setlocale(locale.LC_ALL,'') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 539, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting what is the problem and how to deal with it?

    Read the article

  • Can't get Ubuntu 11.10 working on my VirtualBox running on Mac OsX 10.6.8

    - by stack-o-frankie
    I installed the Guest Additions, installed the isight-firmware-tools by using the AppleUSBVideoSupport file but I still can't get access to the iSight webcam. When I launch vlc v4l2:///dev/video0 I get the following errors: Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS") Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE") [0x92d492c] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. Blocked: call to setlocale(6, "") Blocked: call to setlocale(6, "") (process:2922): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. (vlc:2922): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", (vlc:2922): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", (vlc:2922): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", (vlc:2922): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", [0x963287c] v4l2 demux error: VIDIOC_STREAMON failed [0x963287c] v4l2 demux error: cannot set input (Device or resource busy) [0x96430a4] v4l2 access error: VIDIOC_STREAMON failed [0x96430a4] v4l2 access error: cannot set input (Device or resource busy) [0x9371104] main input error: open of `v4l2:///dev/video0' failed: (null) Any clue?

    Read the article

  • Some problems after running ubuntu tweak application

    - by sachin
    I am a first time user of ubuntu 12.04 and must say that i am enjoying it. Somehow my skype on ubuntu is screwed up. The message that i am getting says (Disk IO error). Did any one face the problem before. Also i downloaded the ubuntu tweak application. After that application has clean some file, the application it self is not starting now.. I am quiet new to linux much and fear that if the tweak application has cleaned some files which were necessary. Is there anything i can fix these problems or short of auto-recovery, i have got some more leads: here seems to be the error but not sure how can i fix this. buntu-tweak:2887): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. Traceback (most recent call last): File "/usr/bin/ubuntu-tweak", line 122, in from ubuntutweak.main import UbuntuTweakWindow File "/usr/lib/python2.7/dist-packages/ubuntutweak/main.py", line 40, in from ubuntutweak.preferences import PreferencesDialog File "/usr/lib/python2.7/dist-packages/ubuntutweak/preferences.py", line 32, in from ubuntutweak.factory import WidgetFactory File "/usr/lib/python2.7/dist-packages/ubuntutweak/factory.py", line 24, in from ubuntutweak.gui.widgets import * File "/usr/lib/python2.7/dist-packages/ubuntutweak/gui/widgets.py", line 10, in from ubuntutweak.settings.compizsettings import CompizSetting File "/usr/lib/python2.7/dist-packages/ubuntutweak/settings/compizsettings.py", line 3, in import ccm File "/usr/lib/python2.7/dist-packages/ubuntutweak/settings/ccm/init.py", line 1, in from Conflicts import * File "/usr/lib/python2.7/dist-packages/ubuntutweak/settings/ccm/Conflicts.py", line 25, in from Constants import * File "/usr/lib/python2.7/dist-packages/ubuntutweak/settings/ccm/Constants.py", line 77, in locale.setlocale(locale.LC_ALL, "") File "/usr/lib/python2.7/locale.py", line 539, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting

    Read the article

  • Apache on linux : spawning processes or threads ?

    - by Jerome WAGNER
    Hello, I would like to understand better exactly what is going on when Apache on linux receive an HTTP request in a process pre-fork model. Let's say we have 20 Apache child processes waiting. When I receive an HTTP request, is it true to say that 1 child process will be chosen to handle the request and that this process won't handle another request from another user until the first one is finished ? I am asking the question because of a PHP limitation that states : The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale(). Thanks Jerome Wagner

    Read the article

  • Apache on linux and i18n : spawning processes or threads ?

    - by Jerome WAGNER
    Hello, I would like to understand better exactly what is going on when Apache on linux receive an HTTP request in a process pre-fork model. Let's say we have 20 Apache child processes waiting. When I receive an HTTP request, is it true to say that 1 child process will be chosen to handle the request and that this process won't handle another request from another user until the first one is finished ? I am asking the question because of a PHP limitation that states : The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale(). Thanks Jerome Wagner

    Read the article

  • How to make strtotime parse dates in Australian (i.e. UK) format: dd/mm/yyyy?

    - by Iain Fraser
    I can't beleive I've never come across this one before. Basically, I'm parsing the text in human-created text documents and one of the fields I need to parse is a date and time. Because I'm in Australia, dates are formatted like dd/mm/yyyy but strtotime only wants to parse it as a US formatted date. Also, exploding by / isn't going to work because, as I mentioned, these documents are hand-typed and some of them take the form of d M yy. I've tried multiple combinations of setlocale but no matter what I try, the language is always set to US English. I'm fairly sure setlocale is the key here, but I don't seem to be able to strike upon the right code. Tried these: au au-en en_AU australia aus Anything else I can try? Thanks so much :) Iain Example: $mydatetime = strtotime("9/02/10 2.00PM"); echo date('j F Y H:i', $mydatetime); Produces 2 September 2010 14:00 I want it to produce: 9 February 2010 14:00

    Read the article

  • Problems trying to format currency with Python (Django)

    - by h3
    I have the following code in Django: import locale locale.setlocale( locale.LC_ALL, '' ) def format_currency(i): return locale.currency(float(i), grouping=True) It work on some computers in dev mode, but as soon as I try to deploy it on production I get this error: Exception Type: TemplateSyntaxError Exception Value: Caught ValueError while rendering: Currency formatting is not possible using the 'C' locale. Exception Location: /usr/lib/python2.6/locale.py in currency, line 240 The weird thing is that I can do this on the production server and it will work without any errors: python manage.py shell >>> import locale >>> locale.setlocale( locale.LC_ALL, '' ) 'en_CA.UTF-8' >>> locale.currency(1, grouping=True) '$1.00' I .. don't get it.i

    Read the article

  • How to write Cyrillic text in C++ console?

    - by VextoR
    For example, if I write: cout << "??????!" << endl; //it's hello in Russian in console it would be something like "-?????!" ok, I know that we can use: setlocale(LC_ALL, "Russian"); but after that not working command line arguments in russian (if I start my program through BAT file): StartProgram.bat chcp 1251 MyProgram.exe -user=???? -password=?????? so, after setlocale program can't read russian arguments properly. This happens because BAT file in CP1251, but console is in CP866 So, there is a question: How to write in C++ console russian text and same time russian command line arguments have to be read properly thanks

    Read the article

  • How do I remove accents from characters in a PHP string?

    - by georgebrock
    I'm attempting to remove accents from characters in PHP string as the first step to making the string usable in a URL. I'm using the following code: $input = "Fóø Bår"; setlocale(LC_ALL, "en_US.utf8"); $output = iconv("utf-8", "ascii//TRANSLIT", $input); print($output); The output I would expect would be something like this: F'oo Bar However, instead of the accented characters being transliterated they are replaced with question marks: F?? B?r Everything I can find online indicates that setting the locale will fix this problem, however I'm already doing this. I've already checked the following details: The locale I am setting is supported by the server (included in the list produced by locale -a) The source and target encodings (UTF-8 and ASCII) are supported by the server's version of iconv (included in the list produced by iconv -l) The input string is UTF-8 encoded (verified using PHP's mb_check_encoding function, as suggested in the answer by mercator) The call to setlocale is successful (it returns 'en_US.utf8' rather than FALSE) The cause of the problem: The server is using the wrong implementation of iconv. It has the glibc version instead of the required libiconv version. Note that the iconv function on some systems may not work as you expect. In such case, it'd be a good idea to install the GNU libiconv library. It will most likely end up with more consistent results. – PHP manual's introduction to iconv Details about the iconv implementation that is used by PHP are included in the output of the phpinfo function. (I'm not able to re-compile PHP with the correct iconv library on the server I'm working with for this project so the answer I've accepted below is the one that was most useful for removing accents without iconv support.)

    Read the article

  • Inconsistent get_class_methods vs method_exists when using UTF8 characters in PHP code

    - by coma
    I have this class in a UTF-8 encoded file called EnUTF8.Class.php: class EnUTF8 { public function ñññ() { return 'ñññ()'; } } and in another UTF-8 encoded file: require_once('EnUTF8.Class.php'); require_once('OneBuggy.Class.php'); $utf8 = new EnUTF8(); //$buggy = new OneBuggy(); echo (method_exists($utf8, 'ñññ')) ? 'ñññ() exists!' : 'ñññ() does not exist...'; echo "\n\n----------------------------------\n\n" print_r(get_class_methods($utf8)); echo "\n----------------------------------\n\n" echo $utf8->ñññ(); that produces the expected result: ñññ() exists! ---------------------------------- Array ( [0] => ñññ ) ---------------------------------- ñññ() but if... require_once('EnUTF8.Class.php'); require_once('OneBuggy.Class.php'); $utf8 = new EnUTF8(); $buggy = new OneBuggy(); echo (method_exists($utf8, 'ñññ')) ? 'ñññ() exists!' : 'ñññ() does not exist...'; echo "\n\n----------------------------------\n\n" print_r(get_class_methods($utf8)); echo "\n----------------------------------\n\n" echo $utf8->ñññ(); then the weirdness appears!!!: ñññ() does not exist! ---------------------------------- Array ( [0] => ñññ ) ---------------------------------- Fatal error: Call to undefined method EnUTF8::ñññ() in /var/www/test.php on line 16 Well, the thing is that OneBuggy.Class.php is UTF-8 encoded too and shares absolutly nothing with EnUTF8.Class.php so... where is the bug? UPDATED: Well, after a long debugging time I found this in OneBuggy.Class.php constructor: setlocale (LC_ALL, "es_ES@euro", "es_ES", "esp"); so I did... //setlocale (LC_ALL, "es_ES@euro", "es_ES", "esp"); and now it works but why?.

    Read the article

  • Android SQLite database locale, locking, and version

    - by gdoten
    In some books and online I see these method calls being made after a database is created: db.setLocale(Locale.getDefault()); db.setLockingEnabled(true); db.setVersion(DB_VERSION); Why is this done? As far as I can tell, after creating a new database, the system adds a table named android_metadata with one field named locale and that table has one row with the locale field set to "en_US". Now I assume the column has that value because I am using a U.S. phone, and if I were using a phone from a different region then the locale field would be set appropriately. Can anyone confirm this? I'm guessing that the setLocale method would only be useful in the case that you install a pre-built database onto a phone and then want to change the locale to match the phone's locale. Sound right? The documentation for setLockingEnabled says it defaults to true so there's no need to make that call, right? Lastly, what's with the call to setVersion? I can't find a table that contains this information so I've been assuming that the database file itself stores the version number somewhere. So when I create a database, which requires you to have already specified the version number in the call to the SQLiteOpenHelper constructor, there's no point in calling setVersion. Again, perhaps this method exists for the case of installing a pre-built database to a device and you then wish to change the database's version (though I can't think of when doing this would make sense). Thanks for any insight!

    Read the article

1 2 3 4  | Next Page >