Created attachment 699906 [details] emerge --info When I build dev-libs/utf8proc-2.6.1 with the "cjk" flag, then julia can't print matrices or vectors. For example, entering "[1, 2]" into the julia repl gives 2-element Vector{Int64}: Error showing value of type Vector{Int64}: ERROR: AssertionError: textwidth(hdots) == textwidth(ddots) I dug into into this a bit. The assertion fails because it believes the text width of the unicode characters 0x2026 and 0x22f1 differ. The data containing the width of these characters comes from the utf8proc library. I've confirmed by compiling the attached C program with "gcc test.c -lutf8proc -o test" and then running "./test" that when compiling the library with the "cjk" flag, the result of printing the textwidth of the character 0x2026 is "2", but building without that flag gives the result "1", which is the same as when I use the version of the library on GitHub. It seems that the cjk flag replaces one of the data files in the library. The fact that it changes the value for this character is odd, since 0x2026 represents three horizontal dots, which has nothing to do with cjk characters as far as I'm aware. If the change is correct, then this is a problem with julia. If it's an error with the patch, then I'm not sure how many other characters might be affected.
Created attachment 699909 [details] C program to print value
Did you read the following message from the ebuild? * Modifying East Asian Ambiguous (A) as wide ... It may cause some trouble with software that expect the width of ambiguous characters as halfwidth. I recommend to disable the cjk USE flag if you don't know what that means. For more detail, please read the "UAX #11: East Asian Width". https://www.unicode.org/reports/tr11/
This can be added in the julia ebuild dev-libs/libutf8proc[-cjk]:0=
Upstream discussion for context: https://github.com/JuliaStrings/utf8proc/pull/83 I've skimmed UAX #11 and the discussion above. Akinori, when might someone want ambiguous characters set to wide? Is there a specific software that requires it? I couldn't find any out of the rdeps for libutf8proc. Should other rdeps also specify [-cjk]?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d7d331f387dfcf804dc7d7915d57ec582af2312 commit 4d7d331f387dfcf804dc7d7915d57ec582af2312 Author: Alessandro Barbieri <lssndrbarbieri@gmail.com> AuthorDate: 2021-04-21 00:40:14 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-09-25 02:58:32 +0000 dev-lang/julia: julia doesn't work if cjk is in utf8proc Closes: https://bugs.gentoo.org/782919 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/20479 Signed-off-by: Sam James <sam@gentoo.org> dev-lang/julia/julia-1.6.0-r1.ebuild | 177 +++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+)