Fable: Repl: cursor does not work correctly with unicode

Created on 22 Jun 2017  路  5Comments  路  Source: fable-compiler/Fable

see http://fable.io/repl#?astInput=false&babili=false&evaluate=false&lineWrap=false&presets=es2015%2Creact%2Cstage-2&code=%0D%0A%0D%0Alet%20%60%60%E1%B9%B3%CC%AA%CD%AB%CD%97%CD%A7%CD%8An%CC%B9%CD%87%CD%99%CC%9C%CD%9B%CC%8Ab%CD%8D%CD%94%CC%9E%CC%AB%CD%9A%CC%AD%CC%98%CD%AE%CD%A9%CC%81o%CC%B1%CD%89%CC%99%CC%98%CC%9C%CC%AA%CC%9E%CC%B1%CC%BE%CD%AE%CD%92%CD%A7%CC%8B%CD%A9%CC%94%CC%93%CD%AEx%CC%B1%CC%B1%CC%BB%CC%B1%CD%8D%CD%88%CC%B2%CD%99%CC%80%CD%AB%CD%A7%CC%91%CC%92%CD%A7%60%60%20%3D%20unbox%0D%0A%0D%0A%0D%0Atype%20RecordA%20%3D%20%7B%20A%20%3A%20int%20%3B%20B%20%3A%20string%20%7D%0D%0Atype%20RecordB%20%3D%20%7B%20A%20%3A%20string%20%3B%20B%20%3A%20int%20%7D%0D%0A%0D%0Alet%20a%20%3D%20%7B%20RecordA.A%20%3D%201%20%3B%20B%20%3D%20%222%22%20%7D%0D%0A%0D%0A%0D%0Alet%20b%20%3A%20RecordB%20%3D%20%60%60%E1%B9%B3%CC%AA%CD%AB%CD%97%CD%A7%CD%8An%CC%B9%CD%87%CD%99%CC%9C%CD%9B%CC%8Ab%CD%8D%CD%94%CC%9E%CC%AB%CD%9A%CC%AD%CC%98%CD%AE%CD%A9%CC%81o%CC%B1%CD%89%CC%99%CC%98%CC%9C%CC%AA%CC%9E%CC%B1%CC%BE%CD%AE%CD%92%CD%A7%CC%8B%CD%A9%CC%94%CC%93%CD%AEx%CC%B1%CC%B1%CC%BB%CC%B1%CD%8D%CD%88%CC%B2%CD%99%CC%80%CD%AB%CD%A7%CC%91%CC%92%CD%A7%60%60(a)%0D%0A%0D%0Aprintfn%20%22a%20%3D%20%25A%22%20a%0D%0Aprintfn%20%22b%20%3D%20%25A%22%20b%0D%0Aprintfn%20%22b.A%20%3D%20%25A%22%20b.A%0D%0Aprintfn%20%22b.B%20%3D%20%25A%22%20b.B%0D%0A%0D%0Aprintfn%20%22(a.A%20%2B%20b.B)%20%3D%20%25i%22%20(a.A%20%2B%20b.B)%0D%0A%0D%0Alet%20realB%20%3D%20%7B%20RecordB.A%20%3D%20%221%22%20%3B%20B%20%3D%202%20%7D%0D%0A%0D%0Aprintfn%20%22(a.A%20%2B%20realB.B)%20%3D%20%25i%22%20(a.A%20%2B%20realB.B)

click inside unbox and type or remove a char.

Most helpful comment

Indeed, Monaco seems to have fixed this :tada:

screen shot 2018-01-08 at 4 18 17 pm

All 5 comments

Now that's funny. I guess this as something to do with the ACE editor. We're planning to switch to Monaco, maybe that one handles unicode better?

Indeed, Monaco seems to have fixed this :tada:

screen shot 2018-01-08 at 4 18 17 pm

@alfonsogarciacaro Something to keep in mind, possibly as a milestone issue, is that FCS-Fable does not have proper support for unicode yet, only latin1.

Ah, I remember we talked about this. What were the scenarios affected by this? Actually JS can handle unicode, though there are some edge cases, see #1279

@alfonsogarciacaro Basically what is left is Char.GetUnicodeCategory, everything else flows from there (except surrogate pairs). I've only implemented latin1 initially, but it would be nice to get a proper implementation at some point, perhaps add it as a milestone issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

et1975 picture et1975  路  3Comments

MangelMaxime picture MangelMaxime  路  3Comments

alfonsogarciacaro picture alfonsogarciacaro  路  3Comments

forki picture forki  路  3Comments

MangelMaxime picture MangelMaxime  路  3Comments