0
0

I use FMOD_Sound_GetTag to read TAG in OGG files.
Here a file for example : http://www.coinshifi.info/DL/MyleneFarm … efacon.ogg
In this file,
The TITLE TAG is : Sans Contrefaçon
The ARTIST TAG is : Mylène Farmer
These TAG can be read without error with some app and for example with VorbisComment.exe
With FMOD_Sound_GetTag the TAG read are :
TITLE : Sans Contrefaçon
ARTIST : Mylène Farmer
There is a problem with special caracters, in this example FMOD_Sound_GetTag has transformed "ç" into "ç" and "è" into "è".
Is there a error in my app or an error in fmodex ? (I use fmodex 4.04.28 )

Thanks

Denis

  • You must to post comments
0
0

Ogg uses some kind of variable length unicode (asc > 127 means multible following char(s) = 1 unicode character).

Think I have some little function that replaces most common german unicode characters (ÄÖÜ…) for Visual Basic (see bottom), some programming language have support for various unicode formats. Windows API supports dual-bytes = 1 character only.

FModEx returns the length in bytes, not characters, doing unicode conversation is your job.

Just tested with my player (http://www.ctuser.net/qplayer), shows:
Mylène Farmer – Sans Contrefaçon
???, Ainsi sois je… (Lied ???)

Artist – Title
Year, Album (Lied ID)

VB6 function to replace most common unicode characters in Ogg vorbis tags (from QuickPlayer 1.00 beta 51, newer version use native function PureBasic) to real ANSI (?)

Private Function ReadOggUnChar(ByVal xChar1 As String) As String

If Not InStr(xChar1, Chr(&HC3&)) = 0& Then
‘ÄäÖöÜüß`
xChar1 = _
Replace( _
Replace( _
Replace( _
Replace( _
Replace( _
Replace( _
Replace( _
xChar1 _
, Chr(&HC3&) & Chr(&H84&), "Ä") _
, Chr(&HC3&) & Chr(&HA4&), "ä") _
, Chr(&HC3&) & Chr(&H96&), "Ö") _
, Chr(&HC3&) & Chr(&HB6&), "ö") _
, Chr(&HC3&) & Chr(&H9C&), "Ü") _
, Chr(&HC3&) & Chr(&HBC&), "ü") _
, Chr(&HC3&) & Chr(&H9F&), "ß")

'ÂâÊêÔôÛû
xChar1 = _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        xChar1 _
        , Chr(&HC3&) & Chr(&H82&), "Â") _
        , Chr(&HC3&) & Chr(&HA2&), "â") _
        , Chr(&HC3&) & Chr(&H8A&), "Ê") _
        , Chr(&HC3&) & Chr(&HAA&), "ê") _
        , Chr(&HC3&) & Chr(&H94&), "Ô") _
        , Chr(&HC3&) & Chr(&HB4&), "ô") _
        , Chr(&HC3&) & Chr(&H9B&), "Û") _
        , Chr(&HC3&) & Chr(&HBB&), "û")

'ÁáÉéÓóÚú
xChar1 = _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        xChar1 _
        , Chr(&HC3&) & Chr(&H81&), "Á") _
        , Chr(&HC3&) & Chr(&HA1&), "á") _
        , Chr(&HC3&) & Chr(&H89&), "É") _
        , Chr(&HC3&) & Chr(&HA9&), "é") _
        , Chr(&HC3&) & Chr(&H93&), "Ó") _
        , Chr(&HC3&) & Chr(&HB3&), "ó") _
        , Chr(&HC3&) & Chr(&H9A&), "Ú") _
        , Chr(&HC3&) & Chr(&HBA&), "ú")

'ÀàÈèÒòÙù
xChar1 = _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        Replace( _
        xChar1 _
        , Chr(&HC3&) & Chr(&H80&), "À") _
        , Chr(&HC3&) & Chr(&HA0&), "à") _
        , Chr(&HC3&) & Chr(&H88&), "È") _
        , Chr(&HC3&) & Chr(&HA8&), "è") _
        , Chr(&HC3&) & Chr(&H92&), "Ò") _
        , Chr(&HC3&) & Chr(&HB2&), "ò") _
        , Chr(&HC3&) & Chr(&H99&), "Ù") _
        , Chr(&HC3&) & Chr(&HB9&), "ù")
End If

ReadOggUnChar = Replace(xChar1, Chr(&HC2&) & Chr(&HB4&), "´")
End Function

  • You must to post comments
0
0

Thanks Controller, I will test that.
In this case I suppose the problem come from a bug into fmod which make error when it decode data ?

  • You must to post comments
0
0

its not a bug in fmod it is returning the raw binary data within the tag, if it is unicode, then you are to display it properly

  • You must to post comments
0
0

Thank you Brett for reply,
if it is in unicode it is now simple for me to close this problem.

  • You must to post comments
0
0

The text is probably UTF8 in which case you can read it using a compliant UTF8 decoder. Send me a PM if you’d like a UTF8 decoder for VB6. It should be pretty easy to find C++ libraries/code for decoding utf8 if you’re using C.

  • You must to post comments
0
0

Thanks Janus for your interest about this topic,
yes data are coded in UTF8 format,
I decode all data with an UTF8 decoder I hade and it work very well.

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.