Opened 6 years ago
Last modified 3 years ago
#14357 new bug
Possible bug with MB_CUR_MAX
Reported by: | miqlas | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86-64 |
Description
As far as i can see, Haiku gets it from here: https://github.com/haiku/haiku/blob/b65adbdfbc322bb7d86d74049389c688e9962f15/src/system/libroot/posix/locale/ctype.cpp#L33-L40
and using it here: https://github.com/haiku/haiku/blob/b65adbdfbc322bb7d86d74049389c688e9962f15/src/system/libroot/posix/glibc/stdlib/stdlib.h#L136-L138
IT seems this value not adjusted according the locale settings and returns always 1.
Termux defines it as 4 here: https://github.com/termux/termux-packages/commit/845a978a46710b19066f6393ec593e88706b1576
Maybe this is the culprit at this bug: https://github.com/fish-shell/fish-shell/issues/3646
This happens at least on 64 bit Haiku hrev52219, but i think every Haiku arch is affected.
Change History (3)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
The 1 here is only the default value (the code was introduced in e0eb1d38c4e11e7d728ea2de0a374a4e30c04278). The LocaleBackend is supposed to set this to the correct value, normally from src/system/libroot/add-ons/icu/ICUCtypeData.cpp , setMbCurMax.
If this does not happen, it means the locale was not initialized at all, or the ICU add-on was not loaded. So you are defaulting to the C locale, which only allows plain ASCII and as such, indeed has an MB_CUR_MAX of 1.
comment:3 by , 3 years ago
Fish issue https://github.com/fish-shell/fish-shell/issues/3646 is closed. What about this bug?
If it is a real bug, should it be beta-blocker?