[Bug 234010] Lack of Unicode support in strfmon breaks monitary formatting

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Dec 15 07:51:17 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234010

Conrad Meyer <cem at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|11.2-RELEASE                |CURRENT
                 CC|                            |cem at freebsd.org

--- Comment #1 from Conrad Meyer <cem at freebsd.org> ---
Present on CURRENT as well.  Full reproducer program:

#include <locale.h>
#include <monetary.h>
#include <stdio.h>

int
main(void) {
        char buf[80];
        double money = 123456.78;

        setlocale(LC_MONETARY, "sv_SE.UTF-8");
        strfmon(buf, sizeof(buf), "%i", money);
        printf("'%s'\n", buf);

        return 0;
}

$ ./a.exe | hd
00000000  27 31 32 33 c2 34 35 36  2c 37 38 20 53 45 4b 20  |'123.456,78 SEK |
//            1  2  3 ^^  4  5  6  ...

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list