std :: isgraph断言,该如何解决? [英] std::isgraph asserts, how to fix?

查看:169
本文介绍了std :: isgraph断言,该如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

调用 std::isgraph 时,我得到以下断言:

Im getting the following assert when calling std::isgraph:

_ASSERTE(c >= -1 && c <= 255);

这是在Windows平台上构建的unicode,但是语言环境报告为"c".为了支持unicode,我应该将语言环境设置为什么?

It's a unicode built on Windows platform, but the locale is reported as "c". What should I set the locale to in order to support unicode ?

推荐答案

没事.

std::isgraph与Unicode无关.

std::isgraph has nothing to do with Unicode.

特别是,它不能支持您提到的范围之外的任何字符值.

In particular, it cannot support any character value out of the range you've mentioned.

当然,您可以向它传递[UTF-8]代码点的各个字节,但这不会告诉您任何内容.

You could pass it individual bytes of a [say, UTF-8] codepoint, sure, but that wouldn't tell you anything.

它根本不是为您要执行的操作而设计的.

It's simply not designed for what you're trying to do.

请改用ICU之类的适当库.

Use a proper library like ICU instead.

这篇关于std :: isgraph断言,该如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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