equal
deleted
inserted
replaced
192 # dict to be exported to other modules |
192 # dict to be exported to other modules |
193 environ = dict((tolocal(k.encode(u'utf-8')), tolocal(v.encode(u'utf-8'))) |
193 environ = dict((tolocal(k.encode(u'utf-8')), tolocal(v.encode(u'utf-8'))) |
194 for k, v in os.environ.items()) # re-exports |
194 for k, v in os.environ.items()) # re-exports |
195 |
195 |
196 # How to treat ambiguous-width characters. Set to 'wide' to treat as wide. |
196 # How to treat ambiguous-width characters. Set to 'wide' to treat as wide. |
197 wide = (environ.get("HGENCODINGAMBIGUOUS", "narrow") == "wide" |
197 wide = _sysstr(environ.get("HGENCODINGAMBIGUOUS", "narrow") == "wide" |
198 and "WFA" or "WF") |
198 and "WFA" or "WF") |
199 |
199 |
200 def colwidth(s): |
200 def colwidth(s): |
201 "Find the column width of a string for display in the local encoding" |
201 "Find the column width of a string for display in the local encoding" |
202 return ucolwidth(s.decode(_sysstr(encoding), u'replace')) |
202 return ucolwidth(s.decode(_sysstr(encoding), u'replace')) |
203 |
203 |