Message23496
Logged In: YES
user_id=38388
Walter, the fix to .read() looks OK, but the implementation
of .readline() is not correct: there are far more line break
characters in Unicode than just \n. The correct way to check
would be by using .splitlines() which does know about all
the possible line break characters in Unicode, plus it also
handles line ends such as \r\n and just \r correctly. If
.splitlines() returns a list with more than one entry you
know that you've hit a line end and you can push the
remaining entries entries back onto the .charbuffer.
Another nit: you should bump the default for readsize to 72
- the average line size used in text files. |
|
Date |
User |
Action |
Args |
2007-08-23 14:28:04 | admin | link | issue1076985 messages |
2007-08-23 14:28:04 | admin | create | |
|