[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    Re: Advise for making my tags work in Windows
From:       Jeremy Gregorio <jeremy.firefox.addon () gmail ! com>
Date:       2012-11-14 2:47:06
Message-ID: CAH2Gu2FMHogS5=eW9OxZs2tLJOx3M8zNpqgqarbgtjYOMg2udQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks, that is tremendously helpful, especially the unicode stuff. One
last question, is there an easy way to tell tag lib I want an id3v2.3 tag
instead of a 2.4 tag?

On Tue, Nov 13, 2012 at 12:01 AM, Lukáš Lalinský <lalinsky@gmail.com> wrote:

> There are two separate issues:
>
>  1) I don't know about Windows 8, but no Microsoft software up to
> Windows 7 can't read ID3v2.4 tags. With TagLib 1.8, you can force it
> to write ID3v2.3 tags, which Windows should be able to read.
>
>  2) You can pass Unicode strings on Windows just fine. You just need
> to use the Unicode API to call the application and to retrieve them.
> See CommandLineToArgvW()/GetCommandLineW().
>
> Here is an example of a hack I do to get UTF-8 parameters on Windows:
>
> https://github.com/lalinsky/chromaprint/blob/master/examples/fpcalc.c#L318
>
> Lukas
>
>
> On Tue, Nov 13, 2012 at 5:25 AM, Jeremy Gregorio
> <jeremy.firefox.addon@gmail.com> wrote:
> >
> > Hi all,
> >     I'm using the Poco C++ library to make what I hope are UTF 8 and/or
> 16 strings. I'm doing this because I want to be able to pass unicode
> characters on a Windows command line and in an English copy of Win XP and
> well, that just ain't happening :P. I thought I might get clever and base
> 64 encode the string before passing it, then decode it. This more or less
> works in Linux, but not so well in Windows, where the OS' (admittedly
> crummy) unicode support seems to be hamstringing me.
> >
> >     I took the demo tagwriter app, and added this:
> >
> >     std::string decoded;
> >     std::wstring decoded16;
> >
> >     Poco::URI::decode ( argv[i + 1] , decoded ) ;
> >
> >
> >     Poco::UnicodeConverter::toUTF16(decoded, decoded16);
> >
> >     TagLib::String value ( decoded16 );
> >
> >    TagLib::List<TagLib::FileRef>::Iterator it;
> >       for(it = fileList.begin(); it != fileList.end(); ++it) {
> > ....
> >
> >   Then I build and run this under Linux and copy the mp3 I tagged to
> Windows. I pass it some Japanese encoded as base 64 which Poco seems to
> decode OK. The tag is there, I can even read it in Tag Scanner in Windows,
> but just plain Windows XP won't pick up on the tag in the file properties.
> >
> >    Anyway does anyone have any tips/advise/horror stories on getting
> tags working in Win XP's tagging. I've done it once before calling directly
> to tag lib, but I would like to rely on the command line.
> >
> >   Thanks all!
> >
> > --
> > Jeremy D Gregorio
> > Sr Consultant
> > #: 520-275-5352
> > fax: 520-747-2540
> >
> >
> >
> >
> > _______________________________________________
> > taglib-devel mailing list
> > taglib-devel@kde.org
> > https://mail.kde.org/mailman/listinfo/taglib-devel
> >
> _______________________________________________
> taglib-devel mailing list
> taglib-devel@kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
>



-- 
Jeremy D Gregorio
Sr Consultant
#: 520-275-5352
fax: 520-747-2540

<http://www.linkedin.com/pub/jeremy-gregorio/36/302/429>
<http://www.glimmersoft.com/socialmedia/btn_viewmy_160x33.png>

[Attachment #5 (text/html)]

Thanks, that is tremendously helpful, especially the unicode stuff. One last \
question, is there an easy way to tell tag lib I want an id3v2.3 tag instead of a 2.4 \
tag?<br><br><div class="gmail_quote">On Tue, Nov 13, 2012 at 12:01 AM, Lukáš \
Lalinský <span dir="ltr">&lt;<a href="mailto:lalinsky@gmail.com" \
target="_blank">lalinsky@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">There are two separate issues:<br> <br>
  1) I don&#39;t know about Windows 8, but no Microsoft software up to<br>
Windows 7 can&#39;t read ID3v2.4 tags. With TagLib 1.8, you can force it<br>
to write ID3v2.3 tags, which Windows should be able to read.<br>
<br>
  2) You can pass Unicode strings on Windows just fine. You just need<br>
to use the Unicode API to call the application and to retrieve them.<br>
See CommandLineToArgvW()/GetCommandLineW().<br>
<br>
Here is an example of a hack I do to get UTF-8 parameters on Windows:<br>
<br>
<a href="https://github.com/lalinsky/chromaprint/blob/master/examples/fpcalc.c#L318" \
target="_blank">https://github.com/lalinsky/chromaprint/blob/master/examples/fpcalc.c#L318</a><br>
 <br>
Lukas<br>
<div><div class="h5"><br>
<br>
On Tue, Nov 13, 2012 at 5:25 AM, Jeremy Gregorio<br>
&lt;<a href="mailto:jeremy.firefox.addon@gmail.com">jeremy.firefox.addon@gmail.com</a>&gt; \
wrote:<br> &gt;<br>
&gt; Hi all,<br>
&gt;       I&#39;m using the Poco C++ library to make what I hope are UTF 8 and/or 16 \
strings. I&#39;m doing this because I want to be able to pass unicode characters on a \
Windows command line and in an English copy of Win XP and well, that just ain&#39;t \
happening :P. I thought I might get clever and base 64 encode the string before \
passing it, then decode it. This more or less works in Linux, but not so well in \
Windows, where the OS&#39; (admittedly crummy) unicode support seems to be \
hamstringing me.<br>

&gt;<br>
&gt;       I took the demo tagwriter app, and added this:<br>
&gt;<br>
&gt;       std::string decoded;<br>
&gt;       std::wstring decoded16;<br>
&gt;<br>
&gt;       Poco::URI::decode ( argv[i + 1] , decoded ) ;<br>
&gt;<br>
&gt;<br>
&gt;       Poco::UnicodeConverter::toUTF16(decoded, decoded16);<br>
&gt;<br>
&gt;       TagLib::String value ( decoded16 );<br>
&gt;<br>
&gt;      TagLib::List&lt;TagLib::FileRef&gt;::Iterator it;<br>
&gt;          for(it = fileList.begin(); it != fileList.end(); ++it) {<br>
&gt; ....<br>
&gt;<br>
&gt;    Then I build and run this under Linux and copy the mp3 I tagged to Windows. I \
pass it some Japanese encoded as base 64 which Poco seems to decode OK. The tag is \
there, I can even read it in Tag Scanner in Windows, but just plain Windows XP \
won&#39;t pick up on the tag in the file properties.<br>

&gt;<br>
&gt;      Anyway does anyone have any tips/advise/horror stories on getting tags \
working in Win XP&#39;s tagging. I&#39;ve done it once before calling directly to tag \
lib, but I would like to rely on the command line.<br> &gt;<br>
&gt;    Thanks all!<br>
&gt;<br>
&gt; --<br>
&gt; Jeremy D Gregorio<br>
&gt; Sr Consultant<br>
&gt; #: 520-275-5352<br>
&gt; fax: 520-747-2540<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; taglib-devel mailing list<br>
&gt; <a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>
&gt; <a href="https://mail.kde.org/mailman/listinfo/taglib-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br> &gt;<br>
_______________________________________________<br>
taglib-devel mailing list<br>
<a href="mailto:taglib-devel@kde.org">taglib-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/taglib-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/taglib-devel</a><br> \
</blockquote></div><br><br clear="all"><br>-- <br>Jeremy D Gregorio<br>Sr \
Consultant<br>#: 520-275-5352<br>fax: 520-747-2540<br><br><a \
href="http://www.linkedin.com/pub/jeremy-gregorio/36/302/429" target="_blank"><img \
src="http://www.glimmersoft.com/socialmedia/btn_viewmy_160x33.png"></a><br> <a \
href="http://www.glimmersoft.com/socialmedia/btn_viewmy_160x33.png" \
target="_blank"></a><br>



_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic