g_convert() character encode converter failure for GBK to utf8
- From: "HUANG Weller (CM/ESW12-CN)" <Weller Huang cn bosch com>
- To: "gtk-list gnome org" <gtk-list gnome org>
- Subject: g_convert() character encode converter failure for GBK to utf8
- Date: Wed, 8 Feb 2017 03:42:36 +0000
Hi Glib developers:
We found a issue of g_convert() when convert the GBK encode to the UTF8.
We are using glib-2.0_2.40.0.
After doing some investigation, I feel it might be caused by the iconv APIs. Since the conversion also fail
with the iconv API directly.
As I understand the iconv API is come from glibc. So I try to do following test:
download the separate library libiconv from https://www.gnu.org/software/libiconv/ 1.14 version
do cross compile for ARM
on target:
export LD_PRELOAD=/usr/lib/preloadable_libiconv.so
run my test to verify
it fixed the issue and the g_convert() success to do the conversion of GBK to utf8.
My questions are:
1. is this caused by the glibc ? because it provided the iconv API for glib. So I need update the glibc ?
2. can I rebuild the glib with the configuration --with-libiconv to fix this issue ?
Best regards
Weller HUANG
Base SW (CM/ESW12-CN)
Bosch Automotive Products (Suzhou) Co. Ltd | No. 126, Su Hong Xi Road
Suzhou Industrial Park | Suzhou P.R.China | P.R.CHINA
Tel. +86(512)6767-4518 | Weller Huang cn bosch com
Sitz: Suzhou, Registergericht: State Administration of Industry & Commerce, P.R.China
Board of Directors: Yudong Chen, Patrick Leinenbach, Liming Chen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]