GTK解决Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()问题
2016-01-06 11:11
906 查看
GTK解决Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()问题
解决方法:
使用g_locale_to_utf8()函数
gchar* g_locale_to_utf8 (const gchar *opsysstring,
gssize len,
gsize *bytes_read,
gsize *bytes_written,
GError **error) G_GNUC_MALLOC;
自己封装起来:
char *_(char *c)
{
return g_locale_to_utf8(c,-1,NULL,NULL,NULL);
}
后面调用:
glist = g_list_append(glist,_("请选择"));
glist = g_list_append(glist,_("数学"));
解决方法:
使用g_locale_to_utf8()函数
gchar* g_locale_to_utf8 (const gchar *opsysstring,
gssize len,
gsize *bytes_read,
gsize *bytes_written,
GError **error) G_GNUC_MALLOC;
自己封装起来:
char *_(char *c)
{
return g_locale_to_utf8(c,-1,NULL,NULL,NULL);
}
后面调用:
glist = g_list_append(glist,_("请选择"));
glist = g_list_append(glist,_("数学"));
相关文章推荐
- [Machine Learning] Generative learning algorithm-GDA and NB
- Guava学习笔记:Google Guava 类库简介
- Django开发博客(五)——新增文章
- UML系列,使用UML实现GOF Design patterns,常用模式类图解读
- 最新Google V8 编译(2015-12-09) 之 HelloWorld
- POJ1003_Hangover
- mongo数据迁移三招
- Google Chrome 扩展程序开发
- Google微软IBM能打败亚马逊AWS的理由很丰满,进展却骨感
- Good Bye 2015B
- Running Spark GraphX algorithms on Library of Congress subject heading SKOS
- Good Bye 2015 A
- UVa 12019 - Doom's Day Algorithm
- Zoho Survey:给问卷加自己的logo
- django foreignkey外键使用 相当于left join
- EGOCache缓存框架详细讲解
- 蓝桥杯 寻找数组中最大值(sort排序+结构体)
- Django开发博客(四)——建立文章列表
- 用户登出Logout or Timeout
- go建造者模式,【go设计模式】