[FFmpeg-cvslog] mp3enc: write ISO8859-1 instead of UTF-16 when possible

Anton Khirnov anton
Mon Feb 7 08:09:08 CET 2011


On Mon, Feb 07, 2011 at 07:35:33AM +0100, Reimar D?ffinger wrote:
> On Sun, Feb 06, 2011 at 10:47:59PM +0100, Anton Khirnov wrote:
> > On Sun, Feb 06, 2011 at 10:02:17PM +0100, Arpi wrote:
> > > Hi,
> > > 
> > > this code is better than nothing but far from being perfect and far from
> > > being what the comment/commitmsg says.
> > > 
> > > iso 8859-1 charset are 32..255 and not 1..127 what the check verifies.
> > > a correct check and conversion although requires utf8 decoding, which
> > > is a bit tricky, especially if you check for bougus data, for example
> > > the string-termitor zero byte after an utf8 prefix...
> > Well spotted, thank you.
> > I don't think handling the 128-255 range is worth the effort.
> > Lower bound fixed.
> 
> Uh, 1-32 are the same for 8859-1, ASCII and UTF-* to my knowledge, so it is silly
> to switch back to UTF-16 in that case...

I used to think so too, but apparrently ISO 8859-1 doesn't specify the
0-31 range at all.

Also the ID3 spec says:
If nothing else is said, strings, including numeric strings and URLs
[URL], are represented as ISO-8859-1 [ISO-8859-1] characters in the
range $20 - $FF.

-- 
Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20110207/29a7c4c3/attachment.pgp>



More information about the ffmpeg-cvslog mailing list