Skip to main content
Topic: cue sheet parsing glitch (Read 180 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

cue sheet parsing glitch

foobar version 1.3.18

It seems that the cue parser can not haddle some uncommon characters, such as "à" (a-grave).
These characters could not be displayed correctly.
Yet more importantly, a string ending with such char would cause playback error, under certain circumstances (shown below).

TITLE "C'est bon que tu sois là"
  • using UTF-8 cue file: unexpected char shown at title
  • using western(win 1252) cue file: Error parsing cuesheet: invalid TITLE syntax

I'd love to write a plugin to fix this, but the foobar SDK seems too complicated due to my coding skill :(
Also I'm not sure whether a plugin can fix this :(

Hope the team can make the cue parser stronger :D
Or is there someone who can enlighten me on how to write such a component to fix this?

Re: cue sheet parsing glitch

Reply #1
Hi,
Please check this thread, maybe it will help you:
https://hydrogenaud.io/index.php/topic,116063.html
I am still not that good in understanding and thus explaining myself that charset-encoding thing in .cue files and its consequences when editing in various apps (foobar, Windows Notepad, Notepad++, others).

Re: cue sheet parsing glitch

Reply #2
1) Open cuesheet in standard windows Notepad, re-save it in UTF-8 (even if Notepad says it is already in UTF-8).
2) Open this cue in fb2k, write everything you want.
https://youtu.be/ZxgmgGbqnPQ

Re: cue sheet parsing glitch

Reply #3
foobar version 1.3.18
os: win10 (language setting: chinese)
So.... I had done more experiment on this topic, and I might have figured out what went wrong.




The original cue file I got was encoded using Western (Windows 1252).
There the "à" binary was e0.
Feeding this to foobar would casue unexpected char in title.

Then I transformed the cue file into UTF-8.
There the "à" binary was c3a0.
Feeding this to foobar would have similar result.

And then I tried what Rollin suggested.
1) Open cuesheet in standard windows Notepad, re-save it in UTF-8 (even if Notepad says it is already in UTF-8).
2) Open this cue in fb2k, write everything you want.
The result was perfect when viewing in foobar.
So I tried to check the binary of the related cue file, and found that the "à" binary was a8a4.
And this was not UTF-8, this was chinese encoding GB2312.




So my conclusion was that,
when given an external cue sheet to parse/display/edit(using Properties window),
foobar used the default encoding of the os, instead of the encoding used by the cue sheet.

I'm not exaggerating, but - even in china - a file encoded using chinese encoding would be concidered satanic. :'((Yes, I hate chinese when I'm coding :'()

But encoding could be something very buggy, and what @Peter put at here should also be considered:
I can't just start writing cuesheets with UTF-8 BOM because it is unknown how other software (CD burners in particular) will react to such files. The best I can do for now is to add an opt-in in advanced preferences.
Maybe "to add an opt-in in advanced preferences" would be a good idea, letting users decide what encoding they prefer to use.




I know foobar is not some sort of open-source project, and I don't want to be rude, thus I am not trying to make any demand.
Please consider me offering ideas.


Re: cue sheet parsing glitch

Reply #5
The original cue file I got was encoded using Western (Windows 1252).

foobar used the default encoding of the os, instead of the encoding used by the cue sheet.

The cuesheet is just a text file, and in your case it's not unicode, so foobar2000 cannot know its real encoding.

Make sence ???
So an option in preferences might help :D

 
SimplePortal 1.0.0 RC1 © 2008-2018