[issue8304] strftime and Unicode characters

2010-04-03 Thread AndiDog

New submission from AndiDog :

There is inconsistent behavior in time.strftime, comparing Python 2.6 and 3.1. 
In 3.1, non-ASCII Unicode characters seem to get dropped whereas in 2.6 you can 
keep them using the necessary Unicode-to-UTF8 workaround.

This should be fixed if it isn't intended behavior.

Python 2.6

>>> time.strftime(u"%d\u200F%A".encode("utf-8"), time.gmtime()).decode("utf-8")
u'03\u200fSaturday'
>>> time.strftime(u"%d\u0041%A".encode("utf-8"), time.gmtime()).decode("utf-8")
u'03ASaturday'

Python 3.1

>>> time.strftime("%d\u200F%A", time.gmtime())
''
>>> len(time.strftime("%d\u200F%A", time.gmtime()))
0
>>> time.strftime("%d\u0041%A", time.gmtime())
'03ASaturday'

--
components: Library (Lib), Unicode
messages: 102269
nosy: AndiDog
severity: normal
status: open
title: strftime and Unicode characters
type: behavior
versions: Python 2.6, Python 3.1

___
Python tracker 
<http://bugs.python.org/issue8304>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8304] strftime and Unicode characters

2010-04-04 Thread AndiDog

AndiDog  added the comment:

Just installed Python 3.1.2, same problem. I'm using Windows XP SP2 with two 
Python installations (2.6.4 and now 3.1.2).

--

___
Python tracker 
<http://bugs.python.org/issue8304>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8304] strftime and Unicode characters

2010-04-04 Thread AndiDog

AndiDog  added the comment:

Definitely a Windows problem. I did this on Visual Studio 2008:

wchar_t out[1000];
time_t currentTime;
time(¤tTime);
tm *timeStruct = gmtime(¤tTime);

size_t ret = wcsftime(out, 1000, L"%d%A", timeStruct);
wprintf(L"ret = %d, out = (%s)\n", ret, out);

ret = wcsftime(out, 1000, L"%d\u200f%A", timeStruct);
wprintf(L"ret = %d, out = (%s)\n", ret, out);

and the output was

ret = 8, out = (04Sunday)
ret = 0, out = ()

Python really shouldn't use any so-called standard functions on Windows. They 
never work as expected ^^...

--
versions: +Python 3.3

___
Python tracker 
<http://bugs.python.org/issue8304>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8456] sqlite3.connect documentation is incorrect

2010-04-19 Thread AndiDog

New submission from AndiDog :

The sqlite3.connect documentation (keyword args) is incorrect:

sqlite3.connect(database[, timeout, isolation_level, detect_types, factory])

As opposed to the C implementation:

if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|diOiOi", kwlist,
 &database, &timeout, detect_types, 
&isolation_level, &check_same_thread, &factory, &cached_statements))
{
return NULL; 
   }

--
assignee: georg.brandl
components: Documentation
messages: 103578
nosy: AndiDog, georg.brandl
severity: normal
status: open
title: sqlite3.connect documentation is incorrect
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue8456>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8853] getaddrinfo should accept port of type long

2010-05-29 Thread AndiDog

New submission from AndiDog :

socket.getaddrinfo("127.0.0.1", 80L)
error: Int or String expected

I would expect getaddrinfo to convert the port number to an integer.

--
components: Library (Lib)
messages: 106726
nosy: AndiDog
priority: normal
severity: normal
status: open
title: getaddrinfo should accept port of type long
type: behavior
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue8853>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com