Opened 2 years ago

Last modified 2 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


As far as i can see, Haiku gets it from here:

and using it here:

IT seems this value not adjusted according the locale settings and returns always 1.

Termux defines it as 4 here:

Maybe this is the culprit at this bug:

This happens at least on 64 bit Haiku hrev52219, but i think every Haiku arch is affected.

Change History (2)

comment:1 by miqlas, 2 years ago

If it is a real bug, should it be beta-blocker?

comment:2 by pulkomandy, 2 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.

Note: See TracTickets for help on using tickets.