Skip to content

Support unicode chars #43

Description

@awaescher

This is an issue I filed in gui.cs a while ago.
I took a look in NStack and I think I found the reason, so I'll open this issue to be able to fix it with a PR.

Issue

I am currently using some unicode signs like in gui.cs: ≡ ⌂ ↑ ↓ …

unicodesguics

While rendering them in a ListView or TextField, I got a IndexOutOfRangeException. In Labels, everything is okay.

   at System.Rune.bisearch(UInt32 rune, UInt32[,] table, Int32 max)
   at System.Rune.ColumnWidth(Rune rune)
   at Terminal.Gui.ListView.ListWrapper.RenderUstr(ustring ustr, Int32 col, Int32 line, Int32 width)
   at Terminal.Gui.ListView.ListWrapper.Render(Boolean marked, Int32 item, Int32 col, Int32 line, Int32 width)
   at Terminal.Gui.ListView.Redraw(Rect region)
   at Terminal.Gui.View.Redraw(Rect region)
   at Terminal.Gui.Window.Redraw(Rect bounds)
   at Terminal.Gui.View.Redraw(Rect region)
   at Terminal.Gui.Application.Redraw(View view)
   at Terminal.Gui.Application.Begin(Toplevel toplevel)
   at Terminal.Gui.Application.Run(Toplevel view)
   at grrui.Program.Main(String[] args) in D:\Develop\GitHub\RepoZ\grrui\Program.cs:line 43

It turns out that "\u2261" for example, returns Rune 8801. Rune.ColumnWidth(8801) throws.

indexoutofrangeexception

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions