Menu

Trac Commit Log


Commit Date  
[r3141] by cboos

Unicode consolidation: use `to_unicode(x)` instead of `unicode(x)` when `x` might be a `str` object.

This is especially true when the content may come from a plugin,
e.g. the fix in the `WikiProcessor` will likely fix #3024.

`to_unicode` will always succeed at producing some unicode object,
whereas the basic `unicode(x)` call can raise an `UnicodeDecodeError`
when given an arbitrarily encoded string.
Thus, `unicode(x)` should only be used when we're confident that `x`
is already an `unicode` or derived object, like `Markup`, or is some other type that can be safely converted to `unicode`.

This also fixes the problems that happened in TracAdmin
when `sys.stdin.encoding` was `None` (#3018).

''Last minute, the typo introduced in r3138 in `format_datetime` is fixed,
and mgood actually already fixed #3018 in r3140 :)''

2006-04-13 07:06:33 Tree
[r3140] by mgood

trac-admin: handle unicode conversion when `sys.stdin.encoding` is `None` (fixes #3030)

2006-04-13 03:49:43 Tree
[r3139] by eblot

Suppress notification sandbox now that the changes have been committed to the trunk

2006-04-12 23:44:43 Tree
[r3138] by cboos

Don't use the (broken) charset given by `getlocale(locale.LC_TIME)` on windows.
Fixes #2971.

2006-04-12 20:49:40 Tree
[r3137] by cboos

Follow-up to r3109: there was actually more than one user of `cursor.description`, so I decided to factor out the changes.

There's now a `trac.db.get_column_names` utility, which is simpler to use than `cursor.description` (it contains only the names) and is guaranteed to deliver `unicode` objects.

2006-04-12 20:43:16 Tree
[r3136] by athomas

WorkFlow:

* Fixed #3027 by adding frozenset/set to trac.util.
* Merged trunk changes log:trunk@...:3135
* Field objects are now just normal objects, not subclasses of dict. Cleaner.
* Removed redundant ticket_custom_props() CS macro.

2006-04-12 16:36:56 Tree
[r3135] by cboos

TracBrowser now respects line breaks when rendering multi-line properties

2006-04-12 15:47:41 Tree
[r3134] by cboos

Fix h_cdata color, after a suggestion from Tim Hatch. Closes #2765

2006-04-12 15:40:11 Tree
[r3133] by cboos

Partial port of r3099, in order to fix #3020 (which was similar to #2949). This fixes the TracBrowser ''Plain Text'' and ''Original Format'' links, which were broken in case an ancestor of the node got moved (the usual ''path/rev'' vs. ''created_path/created_rev'' issue).

2006-04-12 09:05:31 Tree
[r3132] by cmlenz

Chrome unit tests use `EnvironmentStub` from `trac.test`.

2006-04-12 08:54:42 Tree
Older >
MongoDB Logo MongoDB