Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting for UTF-8-BOM #329

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

c72578
Copy link
Collaborator

@c72578 c72578 commented Jun 3, 2024

This setting allows to enable/disable writing the byte-order mark (BOM)
in case of UTF-8 encoded CUE sheets.

  • Add setting:
    WriteUTF8BOM
    Default:
    WriteUTF8BOM=1
    The setting is enabled by default, to preserve previous behavior.
  • For now, the setting can be modified by editing settings.txt after
    closing CUETools or CUERipper:
    Use bool value 0, to disable writing the BOM to UTF-8 encoded CUE
    sheets.
  • The setting is available in the CUETools as well as the CUERipper
    settings.txt file.

This setting allows to enable/disable writing the byte-order mark (BOM)
in case of UTF-8 encoded CUE sheets.

- Add setting:
  `WriteUTF8BOM`
  Default:
  `WriteUTF8BOM=1`
  The setting is enabled by default, to preserve previous behavior.
- For now, the setting can be modified by editing `settings.txt` after
  closing CUETools or CUERipper:
  Use bool value 0, to disable writing the BOM to UTF-8 encoded CUE
  sheets.
- The setting is available in the CUETools as well as the CUERipper
  `settings.txt` file.
@c72578
Copy link
Collaborator Author

c72578 commented Jun 3, 2024

Here is a build for testing:
CUETools_2.2.5_2024-06-03_git_0e10505_Add setting for UTF-8-BOM.zip
SHA256: 6f3764ed938cda94bd730d3d7b5dbd92c5306cb118e592279e8821f421f26b1b

Settings for creating UTF-8 encoded cue sheets without BOM:

AlwaysWriteUTF8CUEFile=1
WriteUTF8BOM=0

@ffwema
Copy link

ffwema commented Jun 4, 2024

Nice that this setting was added. Tested it with a few cuesheets (ANSI, UTF-8, UTF-8-BOM and UTF-16 LE BOM encoded) without issues.
Although I would vote for WriteUTF8BOM=0 to be the default as I doubt any modern player has issues playing BOMless UTF-8 cuesheets.

@c72578
Copy link
Collaborator Author

c72578 commented Jun 6, 2024

@ha-korth, what do you think about WriteUTF8BOM=0 as default?

@ha-korth
Copy link

ha-korth commented Jun 6, 2024

The primary purpose for saving a CUE sheet is CD burning. That should be considered for the default. I don't have time to test right now but I know for example that ImgBurn supports UTF-8-BOM. I don't know if UTF-8 is supported.

@ha-korth
Copy link

ha-korth commented Jun 7, 2024

I recommend leaving WriteUTF8BOM=1 as default. Characters mangled in ImgBurn and EAC "Write CD-R" when using UTF-8 encoded cue sheets without BOM. I didn't test further.

@c72578
Copy link
Collaborator Author

c72578 commented Jun 7, 2024

I recommend leaving WriteUTF8BOM=1 as default. Characters mangled in ImgBurn and EAC "Write CD-R" when using UTF-8 encoded cue sheets without BOM. I didn't test further.

@ha-korth Thanks for the feedback and for checking ImgBurn and EAC.

@c72578 c72578 merged commit 6db48e5 into gchudov:master Jun 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants