suragch / mongol-library

A library to allow vertical script Mongolian in Android apps
MIT License
58 stars 17 forks source link

The medial version of 'DA' is right in the candidate view. But it becomes wrong in editor view or after user copy/paste it to another APP. #8

Open HusilengCode opened 1 year ago

HusilengCode commented 1 year ago

The medial version of 'DA' is right in the candidate's view. But it becomes wrong after users copy/paste it to another APP or view. The Unicode for such a case should be \u1833 \u180B instead of just \u1833.

suragch commented 1 year ago

Hi @HusilengCode

What is the word you are using the medial DA in?

I haven't been developing this library for the last few years since I switched to Flutter for my Android and iOS apps. If you would like to continue the development yourself in your own fork, I can point people your direction.

HusilengCode commented 1 year ago

Hi Jonathan,

ᠰᠨᠳᠤᠨ , actually, it is wrong based on the Mongolian Unicode block, and this bug shows up on most phones.

wrong sadon Wrong_sadon

wrong sadon Unicode Wrong_sadon_unicode

Right sadon Right_sadon

Right sadon Unicode Right_sadon_unicode

Mongolian Unicode block Mongolian unicode block

Yeah, I can understand. Flutter is compatible with most platforms and saves lots of effort. I am currently trying to write an IME because the available options have too many mistakes, and Flutter may not do this job. Users need a true Unicode-based flawless IME. I tried to go through your code two short times, but it is still hard to follow all logic and details (especially the other one's code). But do not worry, I will do my homework. You already did a great job! I highly appreciate it. If you need any support from me, please let me know!

Best Regards, Husileng

HusilengCode commented 1 year ago

I labeled the two different medial DA.

image

Best Regards, Husileng

suragch commented 1 year ago

Has this been standardized anywhere? For example, if the image you included above comes from Wikipedia, then this is how it looks on my computer:

Screen Shot 2023-03-18 at 15 43 52

From what I heard, Unicode no longer specifies the variants. (They used to.) Now they just specify the main codes. See the current specification.

On my phone and computer, the "wrong" coding looks correct for ᠰᠨᠳᠤᠨ. Obviously, we are using two different fonts that implement Unicode in different ways. This has been the problem I've had as long as I've been programming for the traditional script. The companies and nations involved still haven't come to an agreement about how to encode the variants.

Anyway, if most users are using the font that you are using, then it would be a worthwhile project to make a new input method. I know what you mean about it being difficult to understand someone else's code so I don't blame you for working on your own project.

HusilengCode commented 1 year ago

Ok, as I checked Apple and Google having the same font as the wrong one. Microsoft is fine.

Still for ᠰᠨᠳᠤᠨ. If I put a space after 'DA,' it is ᠰᠨᠳ ᠤᠨ because 'DA' shows in the final version. And it should go back to the right one ᠰᠨᠳᠤᠨ after I delete the space. It is like this in Microsoft. But our code acts as follows, and the wrong coding comes out at the end:

I did this in Chimee image image image

suragch commented 1 year ago

I just got around to testing this out, but I couldn't reproduce the problem in Chimee. When I enter sadon (\u1830\u1820\u1833\u1824\u1828) and then add a space between \u1833 and \1824 I see the same rendering as you have in your image. But then when I delete the space it automatically returns to the correct rendering (not like your third image. I'm using Chimee 3.3.1.