top | item 11089554

Unicorn: C++ Unicode string library

66 points| captaincrowbar | 10 years ago |github.com | reply

30 comments

order
[+] aurelian15|10 years ago|reply
Looks like a nice project. I'm currently searching for a Unicode library and it appears to me that ICU is the de-facto standard here, which has the benefit of comming pre-installed on pretty much any Linux distribution. Any reason why I should use Unicorn instead? I couldn't find information on how it compares to ICU in the documentation (well, except for the most welcome usage of modern C++).
[+] rspeer|10 years ago|reply
It looks like Unicorn can apply operations (such as regexes) to text that is natively in UTF-8, giving it a distinct advantage over ICU, which was written back when UTF-16 seemed like a good idea and has to convert everything into UTF-16.
[+] cmrdporcupine|10 years ago|reply
The unicode portion looks reasonable, but why is it necessary for it to include its own flags, file io, file management, and environment classes?

Why is it so many C++ libraries fall into this habit of trying to build one big framework. I'm perfectly happy with gflags -- a unicode library would be nice for my project, but now I won't consider this library.

[+] captaincrowbar|10 years ago|reply
Because the whole point is to handle anything that needs Unicode support. A library that only manipulated Unicode strings would be incomplete if you still couldn't use Unicode in command line options, file names, etc.
[+] nly|10 years ago|reply
That's what will happen until there's a defacto/standard library for this stuff. Languages like Python and Go have a wider base in the standard library. C++14 still only gives you platform dependent 'wide' strings, UTF-8 string literals, and UTF-8 conversion... which makes things awkward.
[+] vidoc|10 years ago|reply
Seems like the word 'Unicorn' is currently the buzzword of 2016 in tech!
[+] maaku|10 years ago|reply
Your github pages breaks the back button.
[+] captaincrowbar|10 years ago|reply
No idea what you mean, sorry. I'm just using Github's automatically generated web pages, so if there's a problem there it's probably a Github issue.
[+] sdegutis|10 years ago|reply
That's not fair. It's pretty well known that Github uses JS to hijack page navigation and make it "smoother" for people. And of course that's going to be faulty, and I emailed them years ago when they made the switch, and asked them to make it an optional behavior because I hate it. But that has nothing to do with OP or OP's link or content. It's like judging a book by the book store.
[+] xjia|10 years ago|reply
Anyone can compare this to Boost.Nowide?