Some days ago i noticed in the ogg vorbis documentation that the comment-field contents should be encoded in UTF-8. A brilliant idea I think, sadly it seems like no one is using it. oggenc and vorbiscomment included in vorbis-tools writes strings to the comments fields blindly without any encoding conversion in violation of the spec. I intend to try to solve these problems to the best of my ability (c is not my first language :) But before I start I thought I'd send a small list of what I think needs to be done. Comments on the ideas are of course welcome 1) Add an option --encoding to oggenc that indicates the encoding of the given comment fields. With this information it is possible to iconv() the incoming strings to UTF-8 before writing them to the .ogg file. If no --encoding is given, a reasonable default should be used (ISO-8859-1 perhaps? Is there any way to extract information from the current locale about what character encoding to expect from user input?) 2) Modify ogg123 to convert the UTF-8 strings back to something that displays ok (ISO-8859-1?). 3) Add sanity checking in the appropriate place of libvorbis to prevent bogous strings to be added as comments. 4) Write a small utility that fixes the comments in existing files to conform to spec. issues: iconv() has some portability prblems judging from the comments in the glibc infopage. I don't have the knowledge about how display and input of different charsets work on different systems, unicode xterm, fonts and so on. My primary goal with this is to make something that works ok for ISO-8859-[1-15] users cheers/daniel ps. Just to get the hang of iconv and libvorbis I wrote a small program that checks the given vorbis files to see if invalid UTF-8 comments exist. The program can be found on http://noa.tm/check_vorbis_comment.c If you want to check all your ogg files, please compile and check with 'find / -name \*.ogg -print0 |xargs -0 ./check_vorbis_comment' -- nuclear cia fbi spy password code president bomb 8D97 F297 CA0D 8751 D8EB 12B6 6EA6 727F 9B8D EC2A --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Thu, 15 Mar 2001, Daniel Resare wrote:> issues: iconv() has some portability prblems judging from the comments in > the glibc infopage.What portability problems are you referring to? Another issue to consider is that oggenc and ogg123 are "supposed to" compile and run on a wide variety of Unix-like systems, many of which do not have glibc. --- Stan Seibert --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Thu, Mar 15, 2001 at 04:48:49PM +0100, Daniel Resare wrote:> 1) Add an option --encoding to oggenc that indicates the encoding of the > given comment fields. With this information it is possible to iconv() > the incoming strings to UTF-8 before writing them to the .ogg file. If no > --encoding is given, a reasonable default should be used (ISO-8859-1 > perhaps? Is there any way to extract information from the current locale > about what character encoding to expect from user input?)Is the LOCALE mechanism widely portable? I think just assuming input/output is in the locale's encoding makes more sense given the simplicity of oggenc/ogg123. Let the user use conversion tools themselves if they're doing something 'non UTF-8' with vorbiscomment.> 3) Add sanity checking in the appropriate place of libvorbis to prevent > bogous strings to be added as comments.This is a good idea, though. And of course both mean some i18n work; I'd be happy to see that go in. IMHO, -ralph --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.