react-native-see-more-inline icon indicating copy to clipboard operation
react-native-see-more-inline copied to clipboard

There is a problem with Chinese character calculation

Open z3season opened this issue 4 years ago • 2 comments

There is a problem with Chinese character calculation

image

z3season avatar Nov 17 '20 06:11 z3season

Hi @seasonZzl. Thanks for raising this issue. I'll get to this in time, but I have a feeling that this has something to do with adjustment in the calculation logic. Try going through getTruncationIndex(...) function in SeeMoreUtil.js file and see what is happening there. Embarrassingly enough, I wrote these functions with only English in mind and I didn't test it for other languages at all.

Please raise a PR if you find a generic fix, else I will check this over the weekend.

Cheers!

kashishgrover avatar Nov 17 '20 08:11 kashishgrover

Hi @seasonZzl. Thanks for raising this issue. I'll get to this in time, but I have a feeling that this has something to do with adjustment in the calculation logic. Try going through getTruncationIndex(...) function in SeeMoreUtil.js file and see what is happening there. Embarrassingly enough, I wrote these functions with only English in mind and I didn't test it for other languages at all.

Please raise a PR if you find a generic fix, else I will check this over the weekend.

Cheers!

I looked at this method getTruncationIndex(...), Chinese characters are different in width and height from English characters, now consider wrapping native controls to implementation

z3season avatar Nov 17 '20 09:11 z3season