HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nemtrif
utfcpp
C++2021–2021
nemtrif / utfcpp

utfcpp

UTF-8 with C++ in a Portable Way

2Distinct people
2Mentions
0Explicit recommenders
2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

UTF-8 with C++ in a Portable Way

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week2 dated mentions

Observed mentions: 2021-07-01 08:08:30 UTC to 2021-09-08 18:43:30 UTC. Weeks start Monday, UTC.

012021-06-28 00:00:00 UTC to 2021-07-05 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 282021-07-05 00:00:00 UTC to 2021-07-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-07-12 00:00:00 UTC to 2021-07-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-07-19 00:00:00 UTC to 2021-07-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-07-26 00:00:00 UTC to 2021-08-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-08-02 00:00:00 UTC to 2021-08-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 22021-08-09 00:00:00 UTC to 2021-08-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-08-16 00:00:00 UTC to 2021-08-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-08-23 00:00:00 UTC to 2021-08-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-08-30 00:00:00 UTC to 2021-09-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-09-06 00:00:00 UTC to 2021-09-13 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsSep 6

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jun 282021-06-28 00:00:00 UTC2021-07-05 00:00:00 UTC101
Jul 52021-07-05 00:00:00 UTC2021-07-12 00:00:00 UTC000
Jul 122021-07-12 00:00:00 UTC2021-07-19 00:00:00 UTC000
Jul 192021-07-19 00:00:00 UTC2021-07-26 00:00:00 UTC000
Jul 262021-07-26 00:00:00 UTC2021-08-02 00:00:00 UTC000
Aug 22021-08-02 00:00:00 UTC2021-08-09 00:00:00 UTC000
Aug 92021-08-09 00:00:00 UTC2021-08-16 00:00:00 UTC000
Aug 162021-08-16 00:00:00 UTC2021-08-23 00:00:00 UTC000
Aug 232021-08-23 00:00:00 UTC2021-08-30 00:00:00 UTC000
Aug 302021-08-30 00:00:00 UTC2021-09-06 00:00:00 UTC000
Sep 62021-09-06 00:00:00 UTC2021-09-13 00:00:00 UTC101

What Hacker News says

2 sources
> I've always tried as much as possible to treat strings as just opaque data and never look into them, which tends to work well, but in some domains you really need to look at and massage the characters/codepoints/grapheme clusters, and the lack of a first-citizen UTF-8-aware string type is, I think, a bit unfortunate in this day and age. You don't need a string type for that, you just need routines that handle UTF-8 strings, like utfcpp (https://github.com/nemtrif/utfcpp).
In Maintain It with Zig
Why are the examples for ztd.text writing UTF-16 to std::cout? Won't this fail on Linux where UTF-16 is rarely used and terminals typically default to UTF-8? Personally I've enjoyed using the tiny-weeny header only utfcpp[0] for simple manipulation of UTF-8 and unicode-to-unicode conversions, and typically use Boost.Locale[1] when I need to do I/O. 95% of localization problems have almost nothing to do with encoding. Encodings are boring. It's like arguing over JSON vs YAML. To do I/O properly across platforms you may need wrappers for the standard output streams that will handle conversion for you, sure, but... you also need to handle date, time and currency formatting/parsing, message formatting, and to enable translations. See [2] regarding Windows: > All of the examples that come with Boost.Locale are designed for UTF-8 and it is the
Read the rest
default encoding used by Boost.Locale. Personally I think doing I/O as UTF-8 on Windows is the right direction, as Microsoft have been enhancing UTF-8 support in Windows for quite a while now. See[3]: > Until recently, Windows has emphasized "Unicode" -W variants over -A APIs. However, recent releases have used the ANSI code page and -A APIs as a means to introduce UTF-8 support to apps. [0] https://github.com/nemtrif/utfcpp [1] https://www.boost.org/doc/libs/1_76_0/libs/locale/doc/html/i... [2] https://www.boost.org/doc/libs/1_76_0/libs/locale/doc/html/r... [3] https://docs.microsoft.com/en-us/windows/apps/design/globali...
In Any Encoding, Ever – ztd.text and Unicode for C++

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.