bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] iconv in terminal and cpp differs


From: Kumar Kandasamy (RBEI/ECA4)
Subject: [bug-gnu-libiconv] iconv in terminal and cpp differs
Date: Wed, 4 Oct 2017 06:30:58 +0000

Hello Team,

 

            We want to transcode GB18030  to  UTF8 using iconv api.

 

We  have below GB18030 encoded string.

 

ÎÒ°®±±¾©Ìì°²ÃÅ£¬Ìì°²ÃÅÉÏÌ«ÑôÉý

 

 

We want to convert this to UTF-8.

 

When we run this as command line as shown below

 

iconv -f gb18030 -t utf-8 GB18030.txt > utf-8.txt

 

utf-8.txt has - 我爱北京天安门,天安门上太阳升

 

but when are run the attached  source code’s binary by inputting like below in same terminal,

 

[Encoder  GB18030_String “FROM”  “TO”]

Encoder ÎÒ°®±±¾©Ìì°²ÃÅ£¬Ìì°²ÃÅÉÏÌ«ÑôÉý “GB18030” “UTF-8”

 

We are getting

 

脦脪掳庐卤卤戮漏脤矛掳虏脙脜拢卢脤矛掳虏脙脜脡脧脤芦脩么脡媒

 

 

 

We don’t know why this difference.  Could you please help us here?

 

 

 

 

 

 

Best regards,

Kandasamy Kumar
RBEI/ECA4

Tel. +91 422 676-4946


Attachment: Encoder.cpp
Description: Encoder.cpp


reply via email to

[Prev in Thread] Current Thread [Next in Thread]