Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Small open source Unicode library for C/C++

Tags:

c++

c

unicode

Does anyone know of a great small open source Unicode handling library for C or C++? I've looked at ICU, but it seems way too big.

I need the library to support:

  • all the normal encodings
  • normalization
  • finding character types - finding if a character should be allowed in identifiers and comments
  • validation - recognizing nonsense
like image 210
Zifre Avatar asked Apr 13 '09 21:04

Zifre


3 Answers

Well, iconv is a good starting point at least.

Also, a google search returns another stackoverflow question! The horror! SO: Light C unicode library

like image 126
gnud Avatar answered Nov 09 '22 04:11

gnud


UTF8-CPP was recommended in the accepted answer to a similar question: Portable and simple unicode string library for C/C++?

like image 45
Reunanen Avatar answered Nov 09 '22 03:11

Reunanen


I looked at UT8-CPP, and libiconv, and neither seemed to have all the features I needed. So, I guess I'll just use ICU, even though it is really big. I think there are some ways to strip out the unneeded functions and data, so I'll try that. This page (under "Customizing ICU's Data Library") describes how to cut out some of the data.

like image 25
Zifre Avatar answered Nov 09 '22 03:11

Zifre