~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/win32utils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
 
171
171
    Returned value can be unicode or plain string.
172
172
    To convert plain string to unicode use
173
 
    s.decode(bzrlib.user_encoding)
 
173
    s.decode(osutils.get_user_encoding())
174
174
    (XXX - but see bug 262874, which asserts the correct encoding is 'mbcs')
175
175
    """
176
176
    appdata = _get_sh_special_folder_path(CSIDL_APPDATA)
224
224
 
225
225
    Returned value can be unicode or plain sring.
226
226
    To convert plain string to unicode use
227
 
    s.decode(bzrlib.user_encoding)
 
227
    s.decode(osutils.get_user_encoding())
228
228
    """
229
229
    home = _get_sh_special_folder_path(CSIDL_PERSONAL)
230
230
    if home:
247
247
 
248
248
    Returned value can be unicode or plain sring.
249
249
    To convert plain string to unicode use
250
 
    s.decode(bzrlib.user_encoding)
 
250
    s.decode(osutils.get_user_encoding())
251
251
    """
252
252
    if has_ctypes:
253
253
        try:
320
320
 
321
321
def _ensure_unicode(s):
322
322
    if s and type(s) != unicode:
323
 
        import bzrlib
324
 
        s = s.decode(bzrlib.user_encoding)
 
323
        s = s.decode(osutils.get_user_encoding())
325
324
    return s
326
325
 
327
326