<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">The nonfiling indicators are correct : "<span style="color:rgb(51,51,51);font-family:Helvetica,Arial,"Arial Unicode MS",sans-serif;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">Diacritical marks or special characters at the beginning of a title field that does not begin with an initial article are not counted as nonfiling characters.</span>" (<a href="https://www.oclc.org/bibformats/en/2xx/245.html">https://www.oclc.org/bibformats/en/2xx/245.html</a>)</div><div style="font-family:tahoma,sans-serif" class="gmail_default"></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Is a space added before any coding for diacritics in an mvr record? Or is the space in the MARC bib record?<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br><div dir="ltr" style="margin-left:0pt"><table style="border:medium none;border-collapse:collapse"><colgroup><col width="94"><col width="530"></colgroup><tbody><tr style="height:0pt"><td style="vertical-align:top;padding:5pt;text-align:right"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:75px;height:75px"><img src="https://lh5.googleusercontent.com/bpjlHkZIWY-VYFVLNA9ro5_6N4c7AxtzAPQhhzTKXaM1luxXME10aRo56LngwgoMXQ-OptUpmewQo8ljPZNpd7H2nZx09Xns4m_RVJ6D7NoWhha3cHDFxXExYWy2c7E0qfs3M5WC" style="margin-left:0px;margin-top:0px" width="75" height="75"></span></span></p></td><td style="vertical-align:top;padding:5pt;text-align:left"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left:9pt"><font size="1"><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">J. Elaine Hardy</span><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">,</span><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">PINES and Collaborative Projects Manager</span></font></p><hr style="margin-left:0px;margin-right:auto"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left:9pt"><font size="1"><span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"></span><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Georgia Public Library Service</span></font></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left:9pt"><font size="1"><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">2872 Woodcock Blvd., Suite 250 | Atlanta, GA 30341</span></font></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left:9pt"><font size="1"><span style="font-family:Verdana;color:rgb(30,67,155);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">(404) 235-7128</span><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> | <a href="mailto:ehardy@georgialibraries.org" target="_blank">ehardy@georgialibraries.org</a></span></font></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left:9pt"><font size="1"><span style="font-family:Verdana;color:rgb(30,67,155);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">(404) 548-4241 | Cell<br></span></font></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt;margin-left:9pt"><a href="https://www.facebook.com/georgialibraries" style="text-decoration:none" target="_blank"><span style="font-size:9pt;font-family:Verdana;color:#1155cc;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:36px;height:36px"><img src="https://lh4.googleusercontent.com/wjWdJl8zhUVb20FdmA0VXc4J9O5c0fKk1TTRabfYTrAZPyt8gtuVsgSIP_gPDaSD0mpvMRmzVxbpurZbyAzV1VrEHAKJUAZkUeSVH-CLb0KFkL6pHU_v09gN6QRKIRtUq1iR-Zbn" style="margin-left:0px;margin-top:0px" width="36" height="36"></span></span></a><span style="font-size:10pt;font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">  </span><a href="https://www.twitter.com/georgialibs" style="text-decoration:none" target="_blank"><span style="font-size:10pt;font-family:Verdana;color:#1155cc;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:35px;height:35px"><img src="https://lh6.googleusercontent.com/9dDBepVWGW2bIMC615q1KfmBTkk04sQENYf3r3X4IP5eYttphc5NQh1IZ4vsfVKxNeDquYf251jJKz3GP8Gs0LSo5nPIlC1gZsTcmFlhGRuaM0RSbHJXxpqqwAVJgjcKud5Jzgop" style="margin-left:0px;margin-top:0px" width="35" height="35"></span></span></a><a href="https://www.instagram.com/georgialibraries/" style="text-decoration:none" target="_blank"><span style="font-size:11pt;font-family:Arial;color:#1155cc;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><span style="border:none;display:inline-block;overflow:hidden;width:37px;height:37px"><img src="https://lh3.googleusercontent.com/qC0XM1vBNxEXGw_lKy9Mi0CItlEXSk42qcHTINcYfBgysbcUifEX39mTV0CvllVyEzZUU7Di1U3uQ4N5hKG7244DAaWAfZIxP3HldZONwuBMo1KdTdPe_5SUXG44S8MQvRFkWJcj" style="margin-left:0px;margin-top:0px" width="37" height="37"></span></span></a></p></td></tr><tr style="height:21pt"><td colspan="2" style="vertical-align:top;padding:5pt"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><font size="1"><a href="http://georgialibraries.org/subscription" style="text-decoration:none" target="_blank"><span style="font-family:Verdana;color:rgb(17,85,204);background-color:rgb(255,255,255);font-weight:400;font-style:italic;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">Join our email list</span></a><span style="font-family:Verdana;color:rgb(0,0,0);background-color:rgb(255,255,255);font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> </span></font><span style="font-size:10pt;font-family:Verdana;color:rgb(67,67,67);background-color:rgb(255,255,255);font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><font size="1">for stories of Georgia libraries making an impact in our communities</font>.</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Verdana;color:rgb(67,67,67);background-color:rgb(255,255,255);font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p><span><span><span style="font-family:comic sans ms,sans-serif">It does not do to leave a live dragon out of your calculations, if you live near him</span>.</span> <i>— <span style="font-family:comic sans ms,sans-serif">J.R.R. Tolkien</span></i></span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:10pt;font-family:Verdana;color:rgb(67,67,67);background-color:rgb(255,255,255);font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"></span></p></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 3, 2023 at 1:37 PM Jeff Davis via Evergreen-dev <<a href="mailto:evergreen-dev@list.evergreen-ils.org">evergreen-dev@list.evergreen-ils.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7518443857616620361">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi Ken,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I'm not very familiar with title sorting. That said, it looks to me like the code in misc_util.tt2 is only used for sorting the user's circs, holds, and circ history in My Account. Search results appear to be sorted as part of the actual search query - that
 is, selecting "Title: A to Z" as your sort option adds a "sort(titlesort)" parameter to your search query and then re-runs the search. The easiest option would probably be to let the underlying Evergreen search sort the results for you in this way.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I believe the titlesort parameter ends up sorting on the value in the metabib.record_sorter table for each record in your results. I'm not sure exactly how metabib.record_sorter values are generated when records are ingested (there's some deep magic involving
 record attributes); at a minimum, it looks like it takes MARC non-filing characters into account and also strips punctuation.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
It seems to me that there are a few cataloguing errors in your examples. There should be no space after the apostrophe in "L'événement" and the non-filing indicator should be "2". For the Sue Grafton books, I think the non-filing indicator should be "1" since
 the initial character (") is non-filing. But you should definitely verify that stuff with an actual cataloguer.
<span id="m_7518443857616620361🙂">🙂</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hopefully some of the above is useful and at least vaguely accurate!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Jeff<br>
</div>
<div id="m_7518443857616620361appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_7518443857616620361divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Evergreen-dev <<a href="mailto:evergreen-dev-bounces@list.evergreen-ils.org" target="_blank">evergreen-dev-bounces@list.evergreen-ils.org</a>> on behalf of Ken Cox via Evergreen-dev <<a href="mailto:evergreen-dev@list.evergreen-ils.org" target="_blank">evergreen-dev@list.evergreen-ils.org</a>><br>
<b>Sent:</b> Saturday, January 28, 2023 7:07 PM<br>
<b>To:</b> <a href="mailto:evergreen-dev@list.evergreen-ils.org" target="_blank">evergreen-dev@list.evergreen-ils.org</a> <<a href="mailto:evergreen-dev@list.evergreen-ils.org" target="_blank">evergreen-dev@list.evergreen-ils.org</a>><br>
<b>Subject:</b> [Evergreen-dev] Struggling with title sorting</font>
<div> </div>
</div>
<div>
<div dir="ltr">I am struggling to sort lists by title in the mobile app.  Can somebody point me to the code where it happens, or explain how it's supposed to happen?
<div><br>
</div>
<div>I found code in <a href="https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/src/templates/opac/parts/misc_util.tt2;h=283bcb098c37f58337cffc5ec4a60c7403e154cd;hb=HEAD#l275" target="_blank">
misc_utils.tt2</a>, and read up on MARC 245 ind2 non-filing characters, hooray!  I implemented the logic and it doesn't match the OPAC, boo!</div>
<div><br>
</div>
<div><b>Is this the right code in <a href="https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/src/templates/opac/parts/misc_util.tt2;h=283bcb098c37f58337cffc5ec4a60c7403e154cd;hb=HEAD#l275" target="_blank">misc_utils.tt2</a> ?</b></div>
<div><br>
</div>
<div>
<blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px">
<div> 275         # If the title has a "non-filing chaaracters" <br>
 276         # (to logically remove leading "The " for example)<br>
 277         # chop the title. Otherwise, chop until the first alphanumeric.<br>
 278         # BTW: Template Toolkit folds 1-element arrays to scalars!<br>
 279         title_node = xml.findnodes('//*[@tag="245"]');<br>
 280 <br>
 281         args.nonfiling_characters = title_node.findvalue('@ind2');<br>
 282       <br>
 283         IF (args.nonfiling_characters > 0);<br>
 284              args.sort_title = args.sort_title.substr(args.nonfiling_characters);
<br>
 285         ELSE;<br>
 286              args.sort_title = args.sort_title.replace('^[^A-Z0-9]*','');<br>
 287         END;<br>
</div>
</blockquote>
</div>
<div><br>
</div>
<div><b>small example</b></div>
<div><br>
</div>
<div><a href="https://catalog.cwmars.org/eg/opac/results?query=&qtype=keyword&fi%3Asearch_format=&locg=1&detail_record_view=0&bookbag=1952592&sort=titlesort&depth=0" target="_blank">My public list</a> in the OPAC sorted by Title looks like this:</div>
<div>
<ol>
<li>"E" is for evidence</li><li>L'événement = Happening</li><li>"G" is for gumshoe<br>
</li></ol>
<div>That looks right.  Logging from the app show why this sort is wrong:</div>
<div><br>
</div>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px">
<div><font face="monospace">item 4692942 has 2 non-filing chars: "L' événement = : Happening" -> " ÉVÉNEMENT = : HAPPENING"<br>
item 3152814 has 0 non-filing chars: ""E" is for evidence" -> "E" IS FOR EVIDENCE"<br>
item 3176781 has 0 non-filing chars: ""G" is for gumshoe" -> "G" IS FOR GUMSHOE"</font><br>
<div><br>
</div>
</div>
</blockquote>
<div>
<div>The first item has a space after L' in <a href="https://catalog.cwmars.org/osrf-gateway-v1?service=open-ils.search&method=open-ils.search.biblio.record.mods_slim.retrieve&param=4692942&_ck=114&_sk=3-7-3" target="_blank">the mvr record</a>, and so skipping 2 chars sorts
 on the space.  Maybe this is an encoding issue in the OSRF gateway?<br>
</div>
<div><br>
</div>
<div>Thanks for listening!</div>
-- <br>
<div dir="ltr">Ken</div>
</div>
</div>
This message originated from outside the M365 organisation. Please be careful with links, and don't trust messages you don't recognise.
</div>
</div>

_______________________________________________<br>
Evergreen-dev mailing list<br>
<a href="mailto:Evergreen-dev@list.evergreen-ils.org" target="_blank">Evergreen-dev@list.evergreen-ils.org</a><br>
<a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-dev" rel="noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-dev</a><br>
</div></blockquote></div>