Page MenuHomePhabricator

`arc feature` incorrect indentation for Unicode characters
Closed, ResolvedPublic

Description

Repro:

arc feature foobar
arc feature ಠ_ಠ
arc feature baz
arc feature

Result:

   foobar                           Committed     D.....
   master                           Committed     D.....
*  baz                              Committed     D.....
   ಠ_ಠ                          Committed     D.....

Notice indentation of last line is incorrect and is missing a few spaces.

Event Timeline

Daniel15 raised the priority of this task from to Low.
Daniel15 updated the task description. (Show Details)
Daniel15 added a subscriber: Daniel15.

phutil_utf8_console_strlen() might not be handling these correctly, or we might be using normal strlen() instead of phutil_utf8_console_strlen().

To fix this:

  • Switch rendering to use PhutilConsoleTable, which handles all this spacing/measuring correctly, including utf8 string and display lengths.
  • It might need some tweaks to deal with console color escape sequences?
  • There should be some options already for rendering a table with no padding so the result is approximately similar to the current output.

(arc tasks should also be switched to use PhutilConsoleTable.)

Yeah, I did see this yesterday. Thanks

Let me try to fix this one as well.