-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
The Problem about ISO-8859-1 #202
Comments
Hi and thanks for your feedback. Could you please explain which field you're saving to ? WAV has many chunks that follow different specifications. |
public void WriteMetaData()
{
foreach (var item in LogList)
{
foreach (var bwf in item.bwfList)
{
Track tr = new(bwf.FullName);
WriteAdditional(tr, "ixml.SCENE", item.scn + "-" + item.sht);
WriteAdditional(tr, "ixml.TAKE", item.tk.ToString());
WriteAdditional(tr, "ixml.NOTE", item.scnNote + "," + item.shtNote);
WriteAdditional(tr, "ixml.CIRCLED", (item.okTk == TkStatus.ok) ? "TRUE" : "FALSE");
WriteAdditional(tr, "ixml.TAKE_TYPE", (item.okTk == TkStatus.bad) ? "NO_GOOD" : "DEFAULT");
WriteAdditional(tr, "ixml.WILD_TRACK", (item.tkNote.Contains("wild")) ? "TRUE" : "FALSE");
tr.Description = item.tkNote;
tr.Title = item.shtNote;
tr.Save();
}
}
}
void WriteAdditional(Track tr, string tag, string content)
{
if (tr.AdditionalFields.ContainsKey(tag)) tr.AdditionalFields[tag] = content;
else tr.AdditionalFields.Add(tag, content);
} the random code happened in ixml.NOTE and question mark in description and title. |
I tried to modify the source to make it enabled to write the utf8 information I need. the title is still random code in File Explorer because the default encoder of my system is GB2312. that's the problem. I read CharsetDetector/UTF-unknown#143 and learn that it maybe the problem caused by this. So it is caused that the Settings.DefaultTextEncoding did not cover the other fields? |
The places where you found garbled text are read and written using I've done that because of what specifications say :
Precisely. Western versions of Windows use Your version of Windows might be expecting => Another way of fixing that issue and make Windows happy would be to use Do you agree with me on that one ?
This has nothing to do with WAV files. UTF-unknown is only used by the library to detect CUE sheets encoding. |
Thanks for your detailed explaination, it answered a lot of problems. And I have to appologize for my ambgious description. I totally agree the answer, the random code on windows explorer in fact dosen't matter in sound production, I have felt the benefit of utf8 especially when I cooperate with others whose OS is macOS. Beside, I finally find that the most important bug:
is actually caused by WavHelper.writeFixedTextValue(description, 256, w); which uses Latin1Encoding as encoder to utf8 text. I inferred that |
Perfect, thanks for confirming 👍 I'm gonna publish a fixed version in the following days. Stay tuned~ |
Fix is available on today's v4.34 |
The problem
When I was writing some Chinese metadata to a wav file, the metadata written in was some random code. I tried to decipher these garbled codes and found that they were encoded by ISO-8859-1 but decoded by utf8. Besides that, all the Chinese metadata written in my bext turned into question marks, which in binary 3F. I am wondering why. Is there any way to avoid writing garbled code?
Environment
tested on codespace and windows in dotnet 7
Details
The text was updated successfully, but these errors were encountered: