Citrus locale multibyte to unicode codepoint?
Issue #189
invalid
Hello,
I’m trying to implement C11 uchar.h in NetBSD’s libc. We need a function that converts between locale-specific multibyte seuqences and unicode code points (char32_t and char16_t). I'm having difficulty following citrus code. What is the best way to implement that using citrus? Can you please assist me with this?
Cheers
Chris Lasocki
Comments (2)
-
repo owner -
repo owner - changed status to invalid
i’m not working on NetBSD anymore, maybe tech-userlevel is suitable place.
- Log in to comment
hi,
more than 8 years has passed when I left from NetBSD project, so Citrus locale code in their libc might have been changed different from that I used to know. so unfortunately I can’t answer anything about your question.
old Citrus adapt CSI(CodeSet Independent) model, but C11’s char{16,32}_t API assumes wchar_t as __STDC_ISO_10646__, so it is hard to implement efficient way.
I believe mbrtoc{16,32} is lesser iconv(3). if I have to implement these silly functions, just simply wraps iconv(3) is better(mbstate_t has enough room to store iconv_t’s pointer).
but Several years ago, I heard rumor that someone working on NetBSD’s wchar_t as __STDC_ISO_10646__(maybe perseant-stdc-iso10646 branch). I think it might help you what you want to do.
yours.