Re: Re: [gtkmm] Set a unicode string as the label of button



I used the Glib::convert(s,"GBK","UTF-16");
but it says:
unhandled exception (type Glib::Error) in signal handler:
domain: g_convert_error
code  :3
what  : Partial character sequence at end of input
does it mean it's not coded by UTF-16 ?
here is the strings from the file I want to transfer
I'm using Chinese Windows XP, so I want to convert them
to GBK format, anyone can help me with this ?
orginal:
----------------------------------------------------
 
 < US蛬WW>
 
   < US蛬銐蕬WW>
 
     < 鶺,g蛬IN>
 
       < US蛬y?
 
         < US蛬烻媁> < ! [ C D A T A [ C ] ] > < / US蛬烻媁>
 
         < US蛬髼h>
 
           < 蛬xQ髼h> < ! [ C D A T A [ s i : ] ] > < / 蛬xQ髼h>
 
         < / US蛬髼h>
 
         < 銐蕬y? < ! [ C D A T A [ n . W[蚹C ] ] > < / 銐蕬y?
 
         < vQ諲> < ! [ C D A T A [ 3 , 0 , 2 0 0 3 / 1 2 / 1 9   2 1 : 2 4 : 3 5 ] ] > < / vQ諲>
 
       < / US蛬y?
 
     < / 鶺,g蛬IN>
 
   < / US蛬銐蕬WW>
 
 < / US蛬WW>
 
 < US蛬WW>
 
   < US蛬銐蕬WW>
 
     < 鶺,g蛬IN>
 
       < US蛬y?
 
         < US蛬烻媁> < ! [ C D A T A [ C ] ] > < / US蛬烻媁>
 
         < US蛬髼h>
 
           < 蛬xQ髼h> < ! [ C D A T A [ s i : ] ] > < / 蛬xQ髼h>
 
         < / US蛬髼h>
 
         < 銐蕬y? < ! [ C D A T A [ n . W[蚹C ] ] > < / 銐蕬y?
 
         < vQ諲> < ! [ C D A T A [ 3 , 1 , 2 0 0 3 / 1 2 / 1 9   2 1 : 2 4 : 3 5 ] ] > < / vQ諲>
 
       < / US蛬y?
 
     < / 鶺,g蛬IN>
 
   < / US蛬銐蕬WW>
 
 < / US蛬WW>
 

converteded manually with MS WORD XP
-----------------------------------------------
<单词块>
 <单词解释块>
  <基本词义>
   <单词项>
    <单词原型><![CDATA[C]]></单词原型>
    <单词音标>
     <词典音标><![CDATA[si:]]></词典音标>
    </单词音标>
    <解释项><![CDATA[n.字母C]]></解释项>
    <其他><![CDATA[3,0,2003/12/19 21:24:35]]></其他>
   </单词项>
  </基本词义>
 </单词解释块>
</单词块>
<单词块>
 <单词解释块>
  <基本词义>
   <单词项>
    <单词原型><![CDATA[C]]></单词原型>
    <单词音标>
     <词典音标><![CDATA[si:]]></词典音标>
    </单词音标>
    <解释项><![CDATA[n.字母C]]></解释项>
    <其他><![CDATA[3,1,2003/12/19 21:24:35]]></其他>
   </单词项>
  </基本词义>
 </单词解释块>
</单词块>


Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

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