Menu

Trac Commit Log


Commit Date  
[r9385] by cboos

l10n/it: updates to Italian catalog contributed by Lele Gaifax (99%)

2010-03-21 11:12:05 Tree
[r9384] by cboos

Refactor `to_unicode`, handle `str` first.

2010-03-21 11:07:02 Tree
[r9383] by cboos

Simplify `to_unicode`.

The `charset` parameter to indicate the ''first'' encoding to try, by default "utf-8". The difference is that now specifying an encoding explicitly doesn't change the conversion to be in ''replace'' mode. Instead, if the first conversion fails, we use the failsafe 'latin1' encoding. If one really need a conversion in replacement mode, this must be done explicitly. A later simplification step will be to remove `charset` argument altogether, as "utf-8" is almost always the only sensible choice in our context.

Also `to_unicode` was using the `locale.getpreferredencoding()` encoding as a fallback since r3569, but there was no benefit from that change, and we should try to get away from using `locale` (#6953). Now we always use 'latin1' as a failsafe encoding.

2010-03-21 10:57:06 Tree
[r9382] by cboos

A few more clean-ups to trac/web/api.py.

2010-03-21 10:52:04 Tree
[r9381] by cboos

Oops, need a quick follow-up to r9380, as decoding unicode to unicode when specifying an encoding is not good...

Don't try to decode anything here, as an invalid URL should anyway be caught earlier.

2010-03-21 10:47:01 Tree
[r9380] by cboos

Try to properly deal with completely invalid URLs like /%E3%80%82%E5%AE%83%E9%9B%86%E6%88%90%E4%BA%86 ... by reporting a 404.

2010-03-21 10:29:47 Tree
[r9379] by cboos

l10n/fr: updating french translation (99%)

2010-03-21 10:21:33 Tree
[r9378] by cboos

l10n: new extraction and new consolidation (+1 message, -1 message)

2010-03-21 10:21:14 Tree
[r9377] by cboos

web: report a readable error when PATH_INFO is not UTF-8 encoded.

There might be circumstances when it's not, either because the client sends a non-UTF-8 request or because the server does some normalization (e.g. 'mbcs'). Supporting these corner cases is not worth the extra complexity, not to mention we don't have such a setup for testing, se we'd likely get it wrong anyway.

Closes #3663.

2010-03-21 10:05:43 Tree
[r9376] by cboos

l10n: consolidate two similar messages and fix a parameter list of an i18n:msg directive (-1 message)

2010-03-21 10:05:22 Tree
Older >
MongoDB Logo MongoDB