Regards.
I have a few questions about locale handling on Windows.
The first: why getlocale() returns (None, None) when the locale is 'C'?
The second is: why this code fails?: loc, enc = locale.getdefau ltlocale() print loc, enc
it_IT cp1252 locale.setlocal e(locale.LC_ALL , (loc, enc))
Traceback (most recent call last):
File "<pyshell#1 5>", line 1, in -toplevel-
locale.setlocal e(locale.LC_ALL , (loc, enc))
File "C:\Python2.4\l ib\locale.py", line 381, in setlocale
return _setlocale(cate gory, locale)
Error: unsupported locale setting
Fortunately locale.setlocal e(locale.LC_ALL , '')
'Italian_Italy. 1252'
and
locale.setlocal e(locale.LC_ALL )
'C'
works...
Thanks Manlio Perillo 0 1091 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: WX |
last post by:
I love Python, and the unicode support is wonderful.
The character set I am using is the Hindi/Devanagari character set at
unicode range U+901.)
I have TWO newbie questions:
(#1) If I paste some unicode stuff from the clipboard into IDLE, it
accepts it, but it can't execute a PRINT command like this:
|
by: Nemok |
last post by:
Hi,
I am new to STD so I have some questions about std::string because I
want use it in one of my projects instead of CString.
1. Is memory set dinamicaly (like CString), can I define for example
string str1; as a class member and then add text to it. or do I have
to
specify it's length when defining?
2. How to convert from std::string to LPCSTR
|
by: Jane |
last post by:
I cannot get Korean data to show up in Command Center or Crystal
Reports. I wrote a small JDBC program and that is working fine.
Here are the details.
DB2 Server : AIX DB2 8.1.3 64 bit
Database territory = En-US
Database code page = 1208
Database code set = UTF-8
Database country/region code = 1
|
by: Henry |
last post by:
Using ideas provided by some of you I was able to figure out how to get the
names of the parameters fields of a crystal report specified at run time.
The code below just basically puts the data into a comboBox. One thing I
noticed, however, is that this method shows me both the parameters used by
the main report and parameters used by the sub-report(s).
|
by: Kenneth McDonald |
last post by:
I am going to demonstrate my complete lack of understanding as to
going back and forth between
character encodings, so I hope someone out there can shed some light
on this. I have always
depended on the kindness of strangers... :-)
I'm playing around with some very simplistic french to english
translation. As some text to
work with, I copied the following from a french news site:
| |
by: R |
last post by:
Hi all,
I have a simple question about locale and PHP5.
I'm using polish characters but I encode them in UTF-8.
I was sorting an array with usort($array, 'strcoll'); but I've entred a
problem.
I was sorting arrays this way:
setlocale(LC_ALL, 'pl_PL.utf8');
|
by: maxt |
last post by:
I am using Windows XP, Tomcat 5.5.17, JRE 1.5.0_08. I am in Australia. For testing localization, my Windows Region is set to English, US.
The Tomcat xml's are set to their install defaults.
When using the Console, tomcat5.exe, my localization files work correctly, returning the Locale, en_US in the string str.
When using Windows Services, the Locale string returned is en.AU with the same code and the Region still set to English, US. ...
|
by: Daniele C. |
last post by:
I will report a snippet from http://php.net/setlocale
I spent about 2 seconds before thinking: can it really be? I mean, is
there no way to set locale info per thread? And after a brief web
search I came up with this keyword: _configthreadlocale
Read more at http://msdn2.microsoft.com/en-us/library//26c0tb7x(VS.80).aspx
(beware, this page is very slow or their servers are anyway).
Looks like this function exists since Windows 95 and...
|
by: Donn Ingle |
last post by:
Hello,
I hope someone can illuminate this situation for me.
Here's the nutshell:
1. On start I call locale.setlocale(locale.LC_ALL,''), the getlocale.
2. If this returns "C" or anything without 'utf8' in it, then things start
to go downhill:
2a. The app assumes unicode objects internally. i.e. Whenever there is
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |