C / C ++中的Unicode字符串规范化 [英] Unicode string normalization in C/C++

查看:118
本文介绍了C / C ++中的Unicode字符串规范化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何规范化字符串(包含utf-8 / utf-16)在C / C ++。
在.NET中有一个函数 String.Normalize

Am wondering how to normalize strings (containing utf-8/utf-16) in C/C++. In .NET there is a function String.Normalize .

我过去使用UTF8-CPP,但它不提供这样的功能。
ICU 和Qt提供字符串规范化,但我更喜欢轻量级解决方案。

I used UTF8-CPP in the past but it does not provide such a function. ICU and Qt provide string normalization but I prefer lightweight solutions.

有没有任何轻量级的解决方案?

Is there any "lightweight" solution for this?

推荐答案

正如我在另一个问题 utf8proc 是一个非常好的,轻量级的库,用于基本的Unicode功能,包括Unicode字符串规范化。

As I wrote in another question, utf8proc is a very nice, lightweight, library for basic Unicode functionality, including Unicode string normalization.

这篇关于C / C ++中的Unicode字符串规范化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆