Ticket #310 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Invalid paths for audio file on export of newly created file

Reported by: julien-quint Owned by: avneesh-singh
Priority: blocker Milestone: Obi 1.0
Component: Application Version:
Keywords: Cc:
Blocked By: Blocking:
Time planned: 1d Time remaining: 1d
Time spent: 1d Estimated Number of Hours:
Add Hours to Ticket: Billable?:
Total Hours:

Description

Create a new project, do some recordings, then export. The paths for audio files is invalid in the exported XML files; see validator for error.

If the project is opened first, there are no export problems.

Change History

comment:1 Changed 11 years ago by avneesh-singh

  • Milestone changed from Obi 1.0 to Obi RC3

comment:1 Changed 11 years ago by daniel-weck

I'm not sure it's a bug in the Urakawa SDK. The XUK format rightfully uses URIs with escaped entities, such as SPACE => %20. It's more likely a bug in the Obi/Export?/Z.cs class, line 84, method RelativePathForUri?(): it is a C# extension method for the XSLT that generates the DAISY 3 fileset. I am wondering whether the return statement should be wrapped in the Uri.UnescapeUriString?() method.

Also, I am wondering whether Uri.UnescapeDataString?(uri) should be replaced by Uri.UnescapeUriString?(uri). According to the MSDN documentation[1]:

" The EscapeUriString? method converts all characters, except RFC 2396 reserved and unreserved characters, to their hexadecimal representation. All Unicode characters are converted to UTF-8 format before being escaped.

This method assumes that stringToEscape has no escape sequences in it.

The string is escaped according to RFC 2396. See this RFC for a definition of reserved and unreserved characters.

Use the EscapeUriString? method to prepare an unescaped URI string to be a parameter to the Uri constructor."

" The EscapeUriString? method converts RFC 2396 reserved characters and all characters with a character value greater than 127 to their hexadecimal representation. All Unicode characters are converted to UTF-8 format before being escaped.

This method assumes that stringToEscape has no escape sequences in it.

The string is escaped according to RFC 2396. See this RFC for a definition of reserved and unreserved characters."

[1] http://msdn.microsoft.com/en-us/library/system.uri.escapeuristring.aspx http://msdn.microsoft.com/en-us/library/system.uri.escapedatastring.aspx

comment:2 Changed 11 years ago by daniel-weck

  • Status changed from new to closed
  • Resolution set to fixed

(In [2295]) fixes #310

Note: See TracTickets for help on using tickets.