[HN Gopher] What is the unit of a text column number?
       ___________________________________________________________________
        
       What is the unit of a text column number?
        
       Author : amar-laksh
       Score  : 14 points
       Date   : 2021-10-19 11:41 UTC (1 days ago)
        
 (HTM) web link (www.foonathan.net)
 (TXT) w3m dump (www.foonathan.net)
        
       | CodeIsTheEnd wrote:
       | Two things:
       | 
       | 1) I recently implemented truncating long lines for CLI tool and
       | went with a hybrid approach using both graphemes and virtual
       | columns -- I'd only truncate a line between graphemes, but when
       | counting how much space was used up I would use virtual columns.
       | In the case of something like , this means things tend to error
       | on the "safe" side of truncating a line too early if the virtual
       | column approach counts it as 4 columns wide rather than 2.
       | 
       | 2) I wanted to test something with the scientist emoji and
       | managed to crash Ruby's repl, irb, simply by pasting it into the
       | repl and then backspacing over it. (It was clearly confused about
       | the position of the cursor, and the stacktrace pointed to an
       | error in a line_editor.rb file.) I was on Ruby 2.7.1, but it
       | looks like it's been fixed in 3.0.0!
        
       | wolverine876 wrote:
       | The title maybe should be enhanced to: "What is the Unicode unit
       | of a text column number?"
        
       ___________________________________________________________________
       (page generated 2021-10-20 23:00 UTC)