<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.35 (Ruby 3.2.3) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>


<rfc ipr="trust200902" docName="draft-brown-davis-base64-sort-01" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="base64-sort">A Sortable Base64 Alphabet</title>

    <author initials="K. R." surname="Davis" fullname="Kyzer R. Davis">
      <organization>Cisco Systems</organization>
      <address>
        <email>kydavis@cisco.com</email> <email>kyzer.davis@outlook.com</email>
      </address>
    </author>
    <author initials="D." surname="Brown" fullname="Dillon Brown">
      <organization>Cisco Systems</organization>
      <address>
        <email>dillbrow@cisco.com</email>
      </address>
    </author>

    <date year="2026"/>

    
    <workgroup>Independent</workgroup>
    <keyword>encoding</keyword> <keyword>base64</keyword>

    <abstract>


<?line 63?>

<t>This document details a formal specification for a new Base64 alphabet which follows the US-ASCII ordering and sorts the same as binary.
This serves as an alternative variant to Base64 and Base64url when lexicographically sortable outputs are required.
The alphabet re-uses the Base64url special characters and is designed to be compatible with existing Base64 implementations, while providing a new option for applications that require sorted output.</t>



    </abstract>

    <note title="About This Document" removeInRFC="true">
      <t>
        The latest revision of this draft can be found at <eref target="https://raw.githubusercontent.com/kyzer-davis/base64-sort-ietf-draft/refs/heads/main/draft-brown-davis-base64-sort.md"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-brown-davis-base64-sort/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Revise Universally Unique Identifier Definitions (uuidrev) Working Group mailing list (<eref target="mailto:uuidrev@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/uuidrev/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/uuidrev/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/kyzer-davis/base64-sort-ietf-draft"/>.</t>
    </note>


  </front>

  <middle>


<?line 69?>

<section anchor="introduction"><name>Introduction</name>

<t>Base64 (<xref section="4" sectionFormat="comma" target="RFC4648"/>) and Base64url (<xref section="5" sectionFormat="comma" target="RFC4648"/>) have been widely implemented and tested across the industry; however, if one requires a lexicographically sortable output they will need to use either Base32hex, Base36, or <xref target="Base58"/>.</t>

<t>There is no standardized sortable Base64 alphabet.
Since the Base64 alphabets from RFC4648 see far more industry usage than the other previously mentioned alphabets there is a real need and requirement for a sortable Base64 Alphabet in the industry.
See: <xref target="RFC4648_Usage_Report"/> for the breakdown of RFC citations for RFC4648 alphabets.</t>

<t>This gap was made further apparent while examining Base64 usage with Universally Unique IDentifiers (UUIDs) defined in <xref target="RFC9562"/> to create <xref target="new-uuid-encoding-techniques-ietf-draft"/> which asserts that UUIDv6 and UUIDv7 benefit greatly from lexicographically sortable alphabets like Base64 Sortable.</t>

<t>This document serves as a standards-track RFC to provide a new alphabet that follows the US-ASCII (<xref target="RFC20"/>) ordering, re-uses the Base64url special characters and sorts the same as binary. This document is created to serve as a reference for new libraries and for future RFCs to cite.</t>

</section>
<section anchor="conventions-and-definitions"><name>Conventions and Definitions</name>

<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

<?line -18?>

</section>
<section anchor="alphabet"><name>The Alphabet</name>

<t>This Base64 Sortable alphabet, which can be referenced as "Base64sort" or sometimes "Base64lex", is a variant of the Base64url alphabet (<xref section="5" sectionFormat="comma" target="RFC4648"/>).</t>

<t>While it utilizes the same set of 64 URL-safe characters as Base64url, its fundamental distinction lies in the assignment of values to these characters by aligning the character values with their US-ASCII (<xref target="RFC20"/>) ordering to ensure that the encoded output sorts lexicographically in the same order as the underlying binary data.</t>

<t>Specifically, the numeric characters (0-9) have been moved before the uppercase and lowercase characters while the special symbol characters, hyphen (-) and underscore (_), are placed at the beginning and middle of the alphabet as they appear in the US-ASCII character set.</t>

<t><xref target="alphabetTable"/> details the alphabet characters along with their respective decoding and encoding values.</t>

<texttable title="The Base64sort Alphabet as table" anchor="alphabetTable">
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Encoding</ttcol>
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Encoding</ttcol>
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Encoding</ttcol>
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Encoding</ttcol>
      <c>0</c>
      <c>-</c>
      <c>16</c>
      <c>F</c>
      <c>32</c>
      <c>V</c>
      <c>48</c>
      <c>k</c>
      <c>1</c>
      <c>0</c>
      <c>17</c>
      <c>G</c>
      <c>33</c>
      <c>W</c>
      <c>49</c>
      <c>l</c>
      <c>2</c>
      <c>1</c>
      <c>18</c>
      <c>H</c>
      <c>34</c>
      <c>X</c>
      <c>50</c>
      <c>m</c>
      <c>3</c>
      <c>2</c>
      <c>19</c>
      <c>I</c>
      <c>35</c>
      <c>Y</c>
      <c>51</c>
      <c>n</c>
      <c>4</c>
      <c>3</c>
      <c>20</c>
      <c>J</c>
      <c>36</c>
      <c>Z</c>
      <c>52</c>
      <c>o</c>
      <c>5</c>
      <c>4</c>
      <c>21</c>
      <c>K</c>
      <c>37</c>
      <c>_</c>
      <c>53</c>
      <c>p</c>
      <c>6</c>
      <c>5</c>
      <c>22</c>
      <c>L</c>
      <c>38</c>
      <c>a</c>
      <c>54</c>
      <c>q</c>
      <c>7</c>
      <c>6</c>
      <c>23</c>
      <c>M</c>
      <c>39</c>
      <c>b</c>
      <c>55</c>
      <c>r</c>
      <c>8</c>
      <c>7</c>
      <c>24</c>
      <c>N</c>
      <c>40</c>
      <c>c</c>
      <c>56</c>
      <c>s</c>
      <c>9</c>
      <c>8</c>
      <c>25</c>
      <c>O</c>
      <c>41</c>
      <c>d</c>
      <c>57</c>
      <c>t</c>
      <c>10</c>
      <c>9</c>
      <c>26</c>
      <c>P</c>
      <c>42</c>
      <c>e</c>
      <c>58</c>
      <c>u</c>
      <c>11</c>
      <c>A</c>
      <c>27</c>
      <c>Q</c>
      <c>43</c>
      <c>f</c>
      <c>59</c>
      <c>v</c>
      <c>12</c>
      <c>B</c>
      <c>28</c>
      <c>R</c>
      <c>44</c>
      <c>g</c>
      <c>60</c>
      <c>w</c>
      <c>13</c>
      <c>C</c>
      <c>29</c>
      <c>S</c>
      <c>45</c>
      <c>h</c>
      <c>61</c>
      <c>x</c>
      <c>14</c>
      <c>D</c>
      <c>30</c>
      <c>T</c>
      <c>46</c>
      <c>i</c>
      <c>62</c>
      <c>y</c>
      <c>15</c>
      <c>E</c>
      <c>31</c>
      <c>U</c>
      <c>47</c>
      <c>j</c>
      <c>63</c>
      <c>z</c>
</texttable>

<t>The Alphabet as a continuous text input can be found in <xref target="alphabetText"/>.</t>

<figure title="The Base64sort Alphabet as text" anchor="alphabetText"><artwork><![CDATA[
-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz
]]></artwork></figure>

<section anchor="padding"><name>Padding</name>

<t>Base64sort follows the same padding logic as Base64url (<xref section="5" sectionFormat="comma" target="RFC4648"/>).
That is, padding <bcp14>MAY</bcp14> be used with Base64sort.</t>

<t>Although the equal sign (=) padding character is positioned between the numeric characters and the uppercase letters in the US-ASCII character set; it does not cause any issues with sorting since the padding is always in the right-most, least significant position of the encoded string.</t>

<t>Note that this assumes the sorted data is either entirely all padded or un-padded encodings.
Mixing padded and un-padded encodings in the same sorted set may lead to unexpected results since the padding character would be treated as a significant character in the sort order.</t>

<t>Implementations <bcp14>MAY</bcp14> utilize a padding character that is not part of the Base64sort alphabet and does not interfere with sorting, such as a tilde (~), to maintain the integrity of the sort order of mixed datasets while still indicating padding.</t>

</section>
</section>
<section anchor="decoding"><name>Decoding</name>

<t>The decoding process for Base64sort follows the principles outlined in (<xref section="5" sectionFormat="comma" target="RFC4648"/>), for decoding Base64url.</t>

</section>
<section anchor="security_considerations"><name>Security Considerations</name>

<t>This document has no security considerations.</t>

</section>
<section anchor="iana_considerations"><name>IANA Considerations</name>

<t>This document has no IANA actions.</t>

</section>


  </middle>

  <back>


<references title='References' anchor="sec-combined-references">

    <references title='Normative References' anchor="sec-normative-references">



<reference anchor="RFC20">
  <front>
    <title>ASCII format for network interchange</title>
    <author fullname="V.G. Cerf" initials="V.G." surname="Cerf"/>
    <date month="October" year="1969"/>
  </front>
  <seriesInfo name="STD" value="80"/>
  <seriesInfo name="RFC" value="20"/>
  <seriesInfo name="DOI" value="10.17487/RFC0020"/>
</reference>

<reference anchor="RFC4648">
  <front>
    <title>The Base16, Base32, and Base64 Data Encodings</title>
    <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
    <date month="October" year="2006"/>
    <abstract>
      <t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="4648"/>
  <seriesInfo name="DOI" value="10.17487/RFC4648"/>
</reference>

<reference anchor="RFC2119">
  <front>
    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
    <author fullname="S. Bradner" initials="S." surname="Bradner"/>
    <date month="March" year="1997"/>
    <abstract>
      <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
    </abstract>
  </front>
  <seriesInfo name="BCP" value="14"/>
  <seriesInfo name="RFC" value="2119"/>
  <seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>

<reference anchor="RFC8174">
  <front>
    <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
    <author fullname="B. Leiba" initials="B." surname="Leiba"/>
    <date month="May" year="2017"/>
    <abstract>
      <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
    </abstract>
  </front>
  <seriesInfo name="BCP" value="14"/>
  <seriesInfo name="RFC" value="8174"/>
  <seriesInfo name="DOI" value="10.17487/RFC8174"/>
</reference>




    </references>

    <references title='Informative References' anchor="sec-informative-references">



<reference anchor="RFC9562">
  <front>
    <title>Universally Unique IDentifiers (UUIDs)</title>
    <author fullname="K. Davis" initials="K." surname="Davis"/>
    <author fullname="B. Peabody" initials="B." surname="Peabody"/>
    <author fullname="P. Leach" initials="P." surname="Leach"/>
    <date month="May" year="2024"/>
    <abstract>
      <t>This specification defines UUIDs (Universally Unique IDentifiers) --
also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform
Resource Name namespace for UUIDs. A UUID is 128 bits long and is
intended to guarantee uniqueness across space and time. UUIDs were
originally used in the Apollo Network Computing System (NCS), later
in the Open Software Foundation's (OSF's) Distributed Computing
Environment (DCE), and then in Microsoft Windows platforms.</t>
      <t>This specification is derived from the OSF DCE specification with the
kind permission of the OSF (now known as "The Open Group"). Information from earlier versions of the OSF DCE specification have
been incorporated into this document. This document obsoletes RFC
4122.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9562"/>
  <seriesInfo name="DOI" value="10.17487/RFC9562"/>
</reference>


<reference anchor="Base58" target="https://github.com/bitcoin/bitcoin/blob/master/src/base58.cpp">
  <front>
    <title>Bitcoin Base58 Encoding</title>
    <author >
      <organization>Bitcoin</organization>
    </author>
    <date year="2008" month="November"/>
  </front>
  <seriesInfo name="commit" value="fae71d3"/>
</reference>
<reference anchor="RFC4648_Usage_Report" target="https://gitlab.com/julian.reschke/base-encodings-terminology/-/blob/main/classifcation.md?ref_type=heads">
  <front>
    <title>RFC4648 Alphabet Usage Report</title>
    <author >
      <organization></organization>
    </author>
    <date year="2025" month="November"/>
  </front>
  <seriesInfo name="commit" value="de0a2760"/>
</reference>
<reference anchor="new-uuid-encoding-techniques-ietf-draft" target="https://datatracker.ietf.org/doc/draft-davis-uuidrev-alt-uuid-encoding-methods/">
  <front>
    <title>Alternate UUID Encoding Methods</title>
    <author initials="K." surname="Davis" fullname="Kyzer Davis">
      <organization></organization>
    </author>
    <date year="n.d."/>
  </front>
</reference>


    </references>

</references>


<?line 166?>

<section anchor="changelog"><name>Changelog</name>

<t>draft-00:</t>

<t><list style="symbols" spacing="compact">
  <t>Initial Release</t>
</list></t>

<t>draft-01:</t>

<t><list style="symbols" spacing="compact">
  <t>Update frontmatter venue and Alt encoding link</t>
</list></t>

</section>
<section anchor="test_vectors"><name>Test Vectors</name>

<t>The following test vectors start with a base of those found in <xref target="RFC4648"/> and then include additional values for testing the new alphabet and its sorting properties.</t>

<section anchor="test_vectors_encode"><name>Encoding</name>

<texttable title="Base64 Sortable Encode Table" anchor="encodeTable">
      <ttcol align='left'>Input</ttcol>
      <ttcol align='left'>Encoded Data</ttcol>
      <ttcol align='left'>Input Type</ttcol>
      <c><spanx style="verb">f</spanx></c>
      <c><spanx style="verb">OV</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">fo</spanx></c>
      <c><spanx style="verb">Oaw</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">foo</spanx></c>
      <c><spanx style="verb">Oaxj</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">foob</spanx></c>
      <c><spanx style="verb">OaxjNV</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">fooba</spanx></c>
      <c><spanx style="verb">OaxjNa3</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">foobar</spanx></c>
      <c><spanx style="verb">OaxjNa4m</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">test</spanx></c>
      <c><spanx style="verb">S5KnS-</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">Hello World</spanx></c>
      <c><spanx style="verb">H5KgQ5wVKqxmQ5F</spanx></c>
      <c>Text</c>
      <c><spanx style="verb">-</spanx></c>
      <c><spanx style="verb">AF</spanx></c>
      <c>Hyphen</c>
      <c><spanx style="verb">0</spanx></c>
      <c><spanx style="verb">B-</spanx></c>
      <c>Digit</c>
      <c><spanx style="verb">_</spanx></c>
      <c><spanx style="verb">Mk</spanx></c>
      <c>Underscore</c>
      <c><spanx style="verb">A</spanx></c>
      <c><spanx style="verb">FF</spanx></c>
      <c>Uppercase Letter</c>
      <c><spanx style="verb">a</spanx></c>
      <c><spanx style="verb">NF</spanx></c>
      <c>Lowercase Letter</c>
      <c><spanx style="verb">=</spanx></c>
      <c><spanx style="verb">EF</spanx></c>
      <c>Equal Sign</c>
      <c><spanx style="verb">~</spanx></c>
      <c><spanx style="verb">UV</spanx></c>
      <c>Tilde</c>
      <c><spanx style="verb">0123456789</spanx></c>
      <c><spanx style="verb">B23mBnFpCYRsDF==</spanx></c>
      <c>Input with Equal Padding</c>
      <c><spanx style="verb">0123456789</spanx></c>
      <c><spanx style="verb">B23mBnFpCYRsDF~~</spanx></c>
      <c>Input with Tilde Padding</c>
</texttable>

</section>
<section anchor="test_vectors_decode"><name>Decoding</name>

<texttable title="Base64 Sortable Decode Table" anchor="decodeTable">
      <ttcol align='left'>Input</ttcol>
      <ttcol align='left'>Decoded Data</ttcol>
      <c><spanx style="verb">OV</spanx></c>
      <c><spanx style="verb">f</spanx></c>
      <c><spanx style="verb">Oaw</spanx></c>
      <c><spanx style="verb">fo</spanx></c>
      <c><spanx style="verb">Oaxj</spanx></c>
      <c><spanx style="verb">foo</spanx></c>
      <c><spanx style="verb">OaxjNV</spanx></c>
      <c><spanx style="verb">foob</spanx></c>
      <c><spanx style="verb">OaxjNa3</spanx></c>
      <c><spanx style="verb">fooba</spanx></c>
      <c><spanx style="verb">OaxjNa4m</spanx></c>
      <c><spanx style="verb">foobar</spanx></c>
      <c><spanx style="verb">S5KnS-</spanx></c>
      <c><spanx style="verb">test</spanx></c>
      <c><spanx style="verb">H5KgQ5wVKqxmQ5F</spanx></c>
      <c><spanx style="verb">Hello World</spanx></c>
      <c><spanx style="verb">AF</spanx></c>
      <c><spanx style="verb">-</spanx></c>
      <c><spanx style="verb">B-</spanx></c>
      <c><spanx style="verb">0</spanx></c>
      <c><spanx style="verb">Mk</spanx></c>
      <c><spanx style="verb">_</spanx></c>
      <c><spanx style="verb">FF</spanx></c>
      <c><spanx style="verb">A</spanx></c>
      <c><spanx style="verb">NF</spanx></c>
      <c><spanx style="verb">a</spanx></c>
      <c><spanx style="verb">EF</spanx></c>
      <c><spanx style="verb">=</spanx></c>
      <c><spanx style="verb">UV</spanx></c>
      <c><spanx style="verb">~</spanx></c>
      <c><spanx style="verb">B23mBnFpCYRsDF==</spanx></c>
      <c><spanx style="verb">0123456789</spanx></c>
      <c><spanx style="verb">B23mBnFpCYRsDF~~</spanx></c>
      <c><spanx style="verb">0123456789</spanx></c>
</texttable>

</section>
</section>
<section anchor="industry_tests"><name>Industry Tests</name>

<t>To validate the lexicographical sortability of the Base64sort alphabet in common computing environments, a series of tests were conducted across various programming languages and database systems.</t>

<t>The objective was to observe how a mixed list of characters from the proposed alphabet would sort using their default string comparison mechanisms.</t>

<section anchor="programming_language_tests"><name>Programming Language Results</name>

<t>Tests were performed using Python, C, C++, Java, JavaScript, Delphi/Object Pascal, Perl, and Go.</t>

<t>In these languages, a list containing a subset of the Base64sort alphabet characters (<spanx style="verb">A</spanx>, <spanx style="verb">a</spanx>, <spanx style="verb">b</spanx>, <spanx style="verb">7</spanx>, <spanx style="verb">3</spanx>, <spanx style="verb">B</spanx>, <spanx style="verb">C</spanx>, <spanx style="verb">c</spanx>, <spanx style="verb">E</spanx>, <spanx style="verb">z</spanx>, <spanx style="verb">-</spanx>, <spanx style="verb">_</spanx>) was sorted.</t>

<t>The results consistently demonstrated sorting according to the US-ASCII character order: <spanx style="verb">-</spanx>, <spanx style="verb">3</spanx>, <spanx style="verb">7</spanx>, <spanx style="verb">A</spanx>, <spanx style="verb">B</spanx>, <spanx style="verb">C</spanx>, <spanx style="verb">E</spanx>, <spanx style="verb">_</spanx>, <spanx style="verb">a</spanx>, <spanx style="verb">b</spanx>, <spanx style="verb">c</spanx>, <spanx style="verb">z</spanx>.</t>

<t>This indicates that the chosen character set and their relative ASCII values are respected by the default string sorting algorithms in these environments.</t>

<t>However, C# and Visual Basic exhibited a different sorting behavior, placing <spanx style="verb">_</spanx> before <spanx style="verb">3</spanx> and sorting uppercase letters after their lowercase counterparts (e.g., <spanx style="verb">a</spanx> before <spanx style="verb">A</spanx>).</t>

<t>This suggests that their default string comparison routines may employ locale-aware or cultural sorting rules rather than strict ordinal (ASCII) comparison.</t>

</section>
<section anchor="database_test_results"><name>Database Test Results</name>

<t>Database tests were conducted on PostgreSQL, MongoDB, and Redis.</t>

<t>With PostgreSQL, when using <spanx style="verb">ORDER BY val ASC</spanx>, the default collation resulted in underscore (_) appearing before the hyphen (-), and lowercase letters before uppercase letters.
However, explicitly specifying <spanx style="verb">ORDER BY val COLLATE "C"</spanx> (which enforces a C locale, often equivalent to strict ASCII ordering) produced the desired sort order: <spanx style="verb">-</spanx>, <spanx style="verb">3</spanx>, <spanx style="verb">7</spanx>, <spanx style="verb">A</spanx>, <spanx style="verb">B</spanx>, <spanx style="verb">C</spanx>, <spanx style="verb">E</spanx>, <spanx style="verb">_</spanx>, <spanx style="verb">a</spanx>, <spanx style="verb">b</spanx>, <spanx style="verb">c</spanx>, <spanx style="verb">z</spanx>.</t>

<t>MongoDB's default sort behavior for the test set aligned with the desired US-ASCII order, matching the results observed in most programming languages.</t>

<t>Redis's <spanx style="verb">SORT ... ALPHA</spanx> command also showed a deviation, placing <spanx style="verb">_</spanx> before <spanx style="verb">3</spanx> and lowercase letters before uppercase, similar to the default SQL, C#, and Visual Basic results.</t>

</section>
<section anchor="conclusion"><name>Conclusion</name>

<t>The testing confirms that the Base64 Sortable alphabet generally achieves its goal of producing lexicographically sortable output when standard US-ASCII or C-locale string comparison rules are applied.</t>

<t>Implementers should be aware that some programming languages and database systems may employ locale-aware or alternative default collation rules that can alter the sort order.</t>

<t>To ensure consistent binary-equivalent sorting, explicit specification of ordinal or C-locale collation may be necessary in environments where such options are available.</t>

</section>
</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA6Vb63bburH+z6fAsX/suJXku5O4TXd9y4537NjxJWna1WVB
FCQhpkiFIG0rjvMs51nOk/WbAUiCtORk92TtJdIgMJcPM4MZALvdbgeZziK1
LXbEeZJmshcpsSuN2toQO9FkJHsqC2Svl6qbbdHj9rZBvyCUmRom6XRbmKwf
BP0kjOUYZPqpHGTtXprcxu2+vNGm7Y1qr6wGJu+NtTE6ibPpBAMODy5eB31Q
2xZrK2tbQZjERsUmN9siS3MVgO96cJuk18M0ySfoH/fVROEnzoJrNcWX/nYg
RFuoOEz6Oh7yH5ZpMNHb4l9ZErYEsU/VwOBtOqaXfwc3Ks4VjXWUF84U5FXi
MtY3KjUyiqb0/iVX4pDY6YFWqdhXAx3rDPIb8SzPdR/QLC2AilXnIySFEOI3
oonWsdTRtnD9/q5VNugkKcko03C0LUZZNjHby8vUjVrAuVN0WqaGZYLSqGVH
YZnE1dko722L6+lXlVqQl32QaXyb5wGdIyBrsopRKm87lkBuVAqwM2jWCZPx
8o/JLRNuyyMl+4YEjpefnOzOGHYh82yUpNtBW1jzeEtMxFlH7FN3yKcYILzQ
rF1PmcrfQ23ChIQq2zGqY78leRYlybX7Cpi2xR51F+dTk6mxKVnt6yhKYrFL
0pWMRB+tJHCNxwwqQZykY5lhPki4s9d7ayvuZWNr48V2EOh40OjxcnNrjV7J
fTZfWJ0ymQ6VB7+FnvHu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