Part of bzrlib
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 45 | Function | encode | Take this unicode revision id, and get a unicode version |
| 66 | Function | decode | Take a utf8 revision id, and decode it, but cache the result |
| 80 | Function | get_cached_unicode | Return a cached version of the unicode string. |
| 92 | Function | get_cached_utf8 | Return a cached version of the utf-8 string. |
| 102 | Function | get_cached_ascii | This is a string which is identical in utf-8 and unicode. |
| 115 | Function | clear_encoding_cache | Clear the encoding and decoding caches |
| 27 | Function | _utf8_decode_with_None | wrap _utf8_decode to support None->None for optional strings. |
Also, only return the Unicode portion, since we don't care about the second return value.
This has a similar idea to that of intern() in that it tries to return a singleton string. Only it works for unicode strings.
Get a cached version of this string (similar to intern()). At present, this will be decoded to ensure it is a utf-8 string. In the future this might change to simply caching the string.