Now the question is what to do if inv_entry.symlink_target is genuinely a Unicode string (with non-ascii characters).
In 'WT4._generate_inventory' we do:
elif kind == 'symlink':
inv_entry.executable = False
inv_entry.text_size = None
inv_entry.symlink_target = utf8_decode(fingerprint)[0]
So I'm guessing we should do something like:
fingerprint = inv_entry.symlink_target
if isinstance(fingerprint, unicode):
fingerprint = fingerprint.encode('UTF-8')
elif fingerprint is None:
fingerprint = ''
Come to think of it, I *think* inv_entry.symlink_target should actually be Unicode all the time. (I'm not positive, though, so we might want some asserts to check the behavior.)
Now the question is what to do if inv_entry. symlink_ target is genuinely a Unicode string (with non-ascii characters). inventory' we do: entry.executabl e = False entry.text_ size = None entry.symlink_ target = utf8_decode( fingerprint) [0]
In 'WT4._generate_
elif kind == 'symlink':
inv_
inv_
inv_
So I'm guessing we should do something like:
fingerprint = inv_entry. symlink_ target fingerprint, unicode): encode( 'UTF-8' )
if isinstance(
fingerprint = fingerprint.
elif fingerprint is None:
fingerprint = ''
Come to think of it, I *think* inv_entry. symlink_ target should actually be Unicode all the time. (I'm not positive, though, so we might want some asserts to check the behavior.)