User talk:PeterSampson/FAQ:Errors

=Archived here as some of this material may need to migrate back to the Wiki=

Gale 01May12: We could almost stop after "Quick Answer", have the whole in the main FAQ (almost half is duplication) and have the " ANSI-created project file on Windows" example on a Wiki page. I think a lot of European users have got the message about 2.0.0 (Unicode) and this issue will be rare.

Why this occurs
This usually means that the AUP project file contains an unexpected non-English, accented or control character at the line quoted in the error message. There are two main causes.
 * The project contains non-English or accented characters and was created in an ANSI build of Audacity, where Windows was running in other than English. ANSI builds are not properly Unicode aware, so do not support creating or re-opening projects containing non-English or accented characters.
 * All recommended downloads of Audacity fully support Unicode. You can check your Audacity version at.
 * The project contains imported files whose metadata (like artist or genre) contains control characters. This mostly occurs with iTunes files on OS X where the project was created in an older version of Audacity.

Quick Answer
 Make a copy of the AUP project file and open it in a text editor like Notepad (Windows) or TextEdit (Mac).  Turn word wrap off in the menus (or in TextEdit, drag the window horizontally so that lines do not wrap).  In the line indicated in the error message, look for one of these:  projname= name= value= title= then remove all characters inside the quotation marks that follow which are not a number or an A to Z letter. You could also change those characters to a number or A to Z letter. For example, a string of control characters you would want to remove or change might start with &# followed by four numbers and a semi-colon, such as &# &#8201;0&#8201;0&#8201;1&#8201;3 ;. Save the changes to the .aup file. If you re-open the project and an error occurs at another line, repeat the steps above in the new line indicated in the error message. 

Example correction of ANSI-created project file on Windows
Here is an example of a corrupt line (marked in red) in an ANSI project file created on a German version of Windows:

   <tag name="ARTIST" value="Fleischmann/> <tag name="COMMENTS" value="H2 90°, Grünke"/>

Instead of storing "90°" and "Grünke" as they appeared when entered, a project file correctly created by an ANSI version of Audacity would store the COMMENTS value in ANSI encoding. It would have appeared thus:

<tag name="COMMENTS" value="H2 90&# &#8201;x&#8201;0&#8201;0&#8201;b&#8201;0;, Gr&#&#8201;x&#8201;0&#8201;0&#8201;f&#8201;c&#8201; ;nke"/>

and the project would have opened in an ANSI version of Audacity with comments incorrectly displayed, or in recommended (Unicode) versions of Audacity with characters correctly displayed.

To correct our AUP file as it is now (not preserving the exact comments):

 <li> Make a copy of the file <li> Open it in a text editor like Notepad <li>Turn word wrap off in the menus <li> Change "90°" to "90 degrees" and "Grünke" to "Gruenke" (both the "degrees" and "Gruenke" must be without quotes):  <tag name="COMMENTS" value="H2 90 degrees, Gruenke"/> </ul> <li> Save the changes to the file. </ol>

To correct our AUP file (preserving the degrees symbol and German character):


 * 1) Make a copy of the file
 * 2) Open the file in Notepad++ (a free text editor that supports UTF-8 encoding of Unicode characters)
 * 3) Choose
 * 4) Save the changes to the file.

Example correction of iTunes-corrupted project file on Mac

 * Bill 25Apr12: This is as far as I got today. Will see if I can create some Mac examples.
 * Gale 01May12: If indeed we need them? Are not almost all Mac cases control characters?

Change all occurrences of strings of characters of the form "&#xxxx;" (where "xxxx" is a four-digit number) to the equivalent non-foreign or non-accented character - you may need to guess as to what they are meant to be. If "xxxx" is between 0000 and 0031, delete the string.