Sujet : Re: UTF16 <-> UTF32
De : OFeem1987 (at) *nospam* teleworm.us (Chris Ahlstrom)
Groupes : comp.lang.c++Date : 01. Sep 2024, 16:07:35
Autres entêtes
Organisation : None
Message-ID : <vb1sf7$1gpoj$1@dont-email.me>
References : 1
User-Agent : slrn/1.0.3 (Linux)
Bonita Montero wrote this copyrighted missive and expects royalties:
Today I needed conversion functions from UTF32 to UTF16 and in the
opposite direction. I wanted to allow result-string re-usage and
decided to give the result string as a reference-parameter. This
would help the result string to keep its capacity.
I think there's no way to implement that code faster.
>
<snip>
Here's a method adopted from the Fluxbox window manager project:
https://github.com/ahlstromcj/potext/blob/master/library/src/po/iconvert.cppIt uses iconv(3). No warranty implied.
-- It seemed the world was divided into good and bad people. The good ones sleptbetter... while the bad ones seemed to enjoy the waking hours much more. -- Woody Allen, "Side Effects"