termwind icon indicating copy to clipboard operation
termwind copied to clipboard

Fix incorrect space count of CJK characters

Open ycs77 opened this issue 1 year ago • 7 comments

fixed #185

Using mb_strwidth() to replace mb_strlen() to fix the incorrect space count of CJK characters.

ycs77 avatar Jun 03 '24 13:06 ycs77

Looks good to me. cc @nunomaduro

xiCO2k avatar Jun 03 '24 18:06 xiCO2k

@xiCO2k can you fixes tests on main and rebase?

nunomaduro avatar Dec 16 '24 13:12 nunomaduro

Sure Will do it later today

xiCO2k avatar Dec 16 '24 14:12 xiCO2k

Hi @nunomaduro, could you review the PR #193? It looks like it may fix CI for this PR 🤔.

ycs77 avatar Dec 23 '24 08:12 ycs77

I saw a new package, Grapheme, which calculates the display width of Unicode graphemes in terminal environments. It is made for Solo by Aaron Francis.

Is it possible to use this package instead to process CJK characters? Maybe it would be better. 🤔

ycs77 avatar Mar 17 '25 17:03 ycs77

Is updated onto upstream

ycs77 avatar May 05 '25 12:05 ycs77

ping @xiCO2k @nunomaduro

ycs77 avatar May 09 '25 08:05 ycs77

@xiCO2k Could you review this PR? The CI is fixed on upstream; I think it's now safe to merge.

ycs77 avatar Jul 18 '25 05:07 ycs77

This fix will be extremely helpful for our team.

jamessa avatar Oct 13 '25 02:10 jamessa

cc @nunomaduro

xiCO2k avatar Oct 16 '25 09:10 xiCO2k

Here a similar case https://github.com/laravel/framework/pull/57367

jamessa avatar Oct 17 '25 01:10 jamessa