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.

thanx,
marc

Up, 2388.

Unfortunately the problem is still there.

Please see this video:https://talk.remobjects.com/uploads/default/original/2X/7/7869a8dc2688108c1f83811e3918612e164203b8.mp4

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.

%E5%9B%BE%E7%89%87

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

%E5%9B%BE%E7%89%87

Built it, and run,

%E5%9B%BE%E7%89%87

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…

Fixed.

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.

10.0.0.2388C 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("🤷🏼‍♀️".ToHexString(),"D83EDD37D83CDFFC200D2640FE0F");
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.

%E5%9B%BE%E7%89%87

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

%E5%9B%BE%E7%89%87

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.