Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 1752 - Windows: Saved project will not open if AUP contains supplementary characters.
Windows: Saved project will not open if AUP contains supplementary characters.
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
unspecified
Per OS Windows (all)
: P2 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-27 13:17 UTC by Steve Daulton
Modified: 2018-08-20 11:51 UTC (History)
3 users (show)

See Also:
Steps To Reproduce:
1) Open the attached project in Audacity (Windows). 2) Save the project with a new name. 3) Close and relaunch Audacity. 4) Attempt to open the saved project.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
petersampsonaudacity: Test‑OK‑Win+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2017-09-27 13:17:54 UTC
If a project contains supplementary characters (for example, one or more emoji characters in a track name, label text or metadata), when saved (Windows only), the character is converted to a surrogate pair, which is illegal in XML 1.0.

Example:
The attached project contains the tag:

<tag name="TITLE" value="asdf &#x1f3a7; asdf"/>

where &#x1f3a7; is a 5 digit HTML entity (hex) for Unicode character U+1F3A7 (headphone symbol).

When the project is saved (on Windows), Audacity converts this character to the surrogate pair: "&#xd83c;&#xdfa7;"
The saved project will now not open (any OS) and will return an error in the form:

"Error: reference to invalid character number at line ..."



Ref:
https://msdn.microsoft.com/en-us/library/ew7hbz7k(VS.71).aspx
https://en.wikipedia.org/wiki/Valid_characters_in_XML
Comment 1 Steve Daulton 2017-09-27 13:19:23 UTC
This proposed fix (pull request) appears to remedy the problem:
https://github.com/audacity/audacity/pull/197

Some additional discussion and clarification about the proposed fix here: https://forum.audacityteam.org/viewtopic.php?p=334421#p334421
Comment 2 Steve Daulton 2017-09-28 03:39:44 UTC
Another example project:
https://forum.audacityteam.org/viewtopic.php?p=334627#p334627

and the problem line is:

<import filename="(FREE) XXXTENTACION Type Beat -  &#xd83d;&#xdc94;   17 ALBUM I Free Type Beat I RapTrap Instrumental.ogg" offset="0.00000000" mute="0" solo="0" height="150" minimized="0" gain="0.794328" pan="0.0"/>
Comment 3 Steve Daulton 2017-11-06 16:21:43 UTC
Fixed at https://github.com/audacity/audacity/commit/26a6815db
Comment 4 Peter Sampson 2017-11-24 11:52:39 UTC
Testing in 2.2.1 RC1

Testing on both projects that Steve referenes in 
a) Comment #1
b) Comment #2

This look to be working properly now - I confirmed that the same projects and steps did not work on 2.2.0