<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:Menlo-Regular;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Here are the two versions. One I get by using the staff interface ‘export’ button. The other via the api.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org>
<b>On Behalf Of </b>Majewski, Steven Dennis (sdm7g)<br>
<b>Sent:</b> Friday, March 27, 2020 3:08 PM<br>
<b>To:</b> Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] EAD via API - character problem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:12.0pt;background:#FFEB9C">
<b><span style="font-size:9.0pt;font-family:"Calibri",sans-serif;color:#9C6500">External Email - Exercise Caution</span></b><o:p></o:p></p>
<div>
<p class="MsoNormal">And maybe send the resulting XML or at least diffs of the two.
<o:p></o:p></p>
<div>
<p class="MsoNormal">( Guessing that there might be a mismatch of file encoding and xml encoding declaration. ) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Mar 27, 2020, at 3:02 PM, Mayo, Dave <<a href="mailto:dave_mayo@harvard.edu">dave_mayo@harvard.edu</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Can you be more precise about what “directly from the archivesspace” means? What page (URL) and control on the page you’re using to generate this? I want to make sure it’s
the same code path in both cases.<br>
<br>
Also, when you say “locally,” do you just mean the script is running locally against the same ASpace instance, or is it a different ASpace instance from the one where you’re getting correct results?<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">--<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Dave Mayo (he/him)<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Senior Digital Library Software Engineer<br>
Harvard University > HUIT > LTS<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <o:p></o:p></span></p>
</div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif">From:<span class="apple-converted-space"> </span></span></b><span style="font-family:"Calibri",sans-serif"><<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org"><span style="color:#954F72">archivesspace_users_group-bounces@lyralists.lyrasis.org</span></a>>
on behalf of "Kennedy, Nancy" <<a href="mailto:KennedyN@si.edu"><span style="color:#954F72">KennedyN@si.edu</span></a>><br>
<b>Reply-To:<span class="apple-converted-space"> </span></b>Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org"><span style="color:#954F72">archivesspace_users_group@lyralists.lyrasis.org</span></a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Friday, March 27, 2020 at 1:41 PM<br>
<b>To:<span class="apple-converted-space"> </span></b>"Archivesspace Users Group (<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org"><span style="color:#954F72">archivesspace_users_group@lyralists.lyrasis.org</span></a>)" <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org"><span style="color:#954F72">archivesspace_users_group@lyralists.lyrasis.org</span></a>><br>
<b>Subject:<span class="apple-converted-space"> </span></b>[Archivesspace_Users_Group] EAD via API - character problem</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi all –<span class="apple-converted-space"> </span><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Today I noticed that if I export an EAD with “Yin-Hsü” directly from the archivesspace, my EAD results carry through with the correct encoding. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">But, when I export locally via the API, I end up with “Yin-Hs</span><span style="font-size:11.0pt;font-family:"MS Gothic"">端</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">”.
I’m using python 3.7.4, via local windows machine. I’ve tried both archivessnake and just using requests, but I still end up with<span class="apple-converted-space"> </span></span><span style="font-size:11.0pt;font-family:"MS Gothic"">端.</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"MS Gothic""> </span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Suggestions? Here’s what I’m doing via asnake:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">export_options = '?include_daos=true&?include_unpublished=false&?numbered_cs=false'<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">for i in resource_ids:<o:p></o:p></span></p>
</div>
<div style="margin-left:.5in">
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">ead = client.get(repo['uri']<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> +'/resource_descriptions/'+str(i)+'.xml'<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> + export_options).text<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Nancy Kennedy<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Smithsonian Institution<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><a href="mailto:kennedyn@si.edu"><span style="color:#954F72">kennedyn@si.edu</span></a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Menlo-Regular",serif">_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
</span><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org"><span style="font-family:"Menlo-Regular",serif;color:#954F72">Archivesspace_Users_Group@lyralists.lyrasis.org</span></a><span style="font-family:"Menlo-Regular",serif"><br>
</span><a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group&data=02%7C01%7CKennedyN%40si.edu%7C2319e6bb352142430e4708d7d2823dd7%7C989b5e2a14e44efe93b78cdd5fc5d11c%7C0%7C0%7C637209329133406866&sdata=A1ERfao94bBiECWmGANe%2BSeSZOSMbIlJSVHx%2FwjBIa4%3D&reserved=0"><span style="font-family:"Menlo-Regular",serif;color:#954F72">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>