Problem when trying to delete Chinese character

That wouldn’t matter, the code editor is rthe same

that’s what I did, so it would seem that for some reason or another,. the build you have does not have my fixes :(. very strange, but it was late last night when this build was finished, maybe I grabbed the wrong one. I’ll send you a new build later today, jic.


Up, 2388.

Unfortunately the problem is still there.

Please see this video:

I use the Win+Alt+R to record the screen, looks like it can not record Help-About Water.

But I am 100% sure I am using 2388, and you can see, it finds App.Ref, which privious version does not.


As for the operating system (I am using Win 10 v1809 64bit), I think it does support unicode.


Built it, and run,


the cursor looks ok in that last screenshot though?

in the video, line 1 and 2 are fine, and line 3 it has the cursor wrong. what’s the difference there, in the video i can’t tell…

No much difference, the problem just happens occasionally.

I didn’t discover the rule, actually

hmm. so each three times you just pasted the ~5 Chinese chars, twice it was fine and third time the cursor is wrong?

“twice it was fine and third time the cursor is wrong”

Yes, but if repeat these steps again, it may not happen each time.

I think I have an idea what’s going on…


It was a caching issue. because there’s overhead calculating the cursor position with non-monospaced characters, I cache whether the current line has. non-ASCII chars, and use the new logic only when it does. Pasting (or fresh typing) did not refresh that cached value, so if the line started out w/o Chinese, after asking Chinese it was still marked as “ASCII only”. once you cursor up and back down it’ll be fine.

Next build has this fixed, ofc. The only (unsolved_ issue remaining is the reverse-mapping for mouse clicks. I have yet to find an efficient way to do this :(. but I think/hope that’s more corner-case as less annoying.

Great! Finally the root cause is identified:grinning:

1 Like

New build is up for you, 2388B

Using the new build, open every project (even the Remobject Samples) will always show the error:

But if click Keep on keeping on, the code editor can still show, and I test, the cursor position problem is solved, thanks!

hmm. can you translate that error message for me?

Sure, it means Object reference not set to an object instance

Oops, yes. totally unrelated bug, from different change I committed last night.

Fixed now, as well as some other Water-specific oddities with my previous change that didn’t happen in Fire and I’ve implemented the reverse-mapping as well, so mouse clicks and drags should now place the cursor properly, as well. is up for you.

Now the only remaining (known) issue emoji made up of multiple code points; the editor still treats these as individual items for cursoring thru them and one selecting/deleting. It’s kinda funny when you have, say, :man_facepalming:t5:, and as you press backspace, it turns into a Woman (:woman_facepalming:t5:), then the Skin changes to yellow (:woman_facepalming:), and then it actually gets deleted ;P)

On a related note, Elements RTL has some nice new APIs to help deal with Unicode code points and Emoji:

Check.AreEqual("🤷🏼‍♀️".ToUnicodeCodePointIndices().JoinedString(","), "0,2,4,5,6");
Check.AreEqual("🤷🏼‍♀️".ToUnicodeCodePoints().JoinedString(","), "129335,127996,8205,9792,65039");
Check.AreEqual("🤷🏼‍♀️".ToUnicodeCharacters().JoinedString(","), "🤷🏼‍♀️");
Check.AreEqual("👁️‍🗨️ Eye in Speech Bubble".ToUnicodeCharacters().JoinedString(","), "👁️‍🗨️, ,E,y,e, ,i,n, ,S,p,e,e,c,h, ,B,u,b,b,l,e");
Check.AreEqual("🇨🇼 Flag: Curaçao".ToUnicodeCharacters().JoinedString(","), "🇨🇼, ,F,l,a,g,:, ,C,u,r,a,ç,a,o");

Thanks, very good, this version works fine for me.

Just have one interesting finding, the debug output can show Chinese for .Net project, but can not for .Net Core project.


But if built the .dll file for the Net Core project, and run it in Windows command line, the Chinese can show.


As I want to migrate all my application to Net core, if this problem can be solved, it is perfect. So that I don’t need to use .Net project type to see Chinese debug console output, and after no problem, copy the codes to an Net core project.