<P> I want to set lyrics of USLT frame to Chinese, and Unicode strings need to be used.The following is my code:</P>
<P>void CID3tag::SetLyrics(const char* pszLrc)<BR>{</P>
<P> int dwLength = MultiByteToWideChar(CP_ACP,0,pszLrc, strlen(pszLrc),NULL,0);</P>
<P> wchar_t *dwBuffer = new WCHAR[dwLength];<BR> int dwBufLen = MultiByteToWideChar(CP_ACP,0,pszLrc,strlen(pszLrc),dwBuffer,dwLength);</P>
<P><BR> TagLib::ID3v2::UnsynchronizedLyricsFrame *frame = new TagLib::ID3v2::UnsynchronizedLyricsFrame;</P>
<P> frame->setLanguage(ByteVector("zho")); <BR> frame->setDescription(frame->description());<BR> frame->setTextEncoding(String::UTF16);<BR> frame->setText(String(dwBuffer));<BR> tag->addFrame(frame);<BR> file->save();<BR> delete dwBuffer;</P>
<P>}</P>
<P>but it doesn't work. Nothing is changed. I tried using it to set english text,</P>
<P>frame->setLanguage(frame->language()); <BR> frame->setDescription(frame->description());<BR> frame->setTextEncoding(frame->textEncoding());<BR> frame->setTextEncoding("abcdefg");</P>
<P>It is fine. How to set unicode string of chinese for USLT tag?<BR></P><hr /><br /><a href = 'http://mail.sina.com.cn/'>×¢²áÐÂÀË2GÃâ·ÑÓÊÏä</a>