<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Unicode on Joseph Hale</title>
    <link>https://thehale.dev/topics/unicode/</link>
    <description>Recent content in Unicode on Joseph Hale</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    
    
    
    
      <lastBuildDate>Mon, 17 Nov 2025 21:17:50 -0700</lastBuildDate>
    
    <atom:link href="https://thehale.dev/topics/unicode/index.xml" rel="self" type="application/rss+xml" />
      <item>
        <title>The emoji that broke my file uploads</title>
        <link>https://thehale.dev/guides/detecting-basic-multilingual-plane/</link>
        <pubDate>Fri, 09 May 2025 00:00:00 +0000</pubDate>
        <guid>https://thehale.dev/guides/detecting-basic-multilingual-plane/</guid>
        <description>&lt;h2 id=&#34;tldr&#34;&gt;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#tldr&#34; aria-hidden=&#34;true&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&#xA;  TL;DR&#xA;  &lt;a class=&#34;hash&#34; href=&#34;#tldr&#34; aria-label=&#34;Link to this heading&#34; title=&#34;Link to this heading&#34; data-copy-title=&#34;Copy a link to this heading&#34;&gt;&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;code-block&#34; style=&#34;--code-block-lang: &#39;Python&#39;&#34;&gt;&#xA;    &lt;div class=&#34;code-block-actions&#34;&gt;&#xA;    &lt;span class=&#34;code-block-lang&#34;&gt;Python&lt;/span&gt;&#xA;  &lt;button type=&#34;button&#34; class=&#34;code-block-copy&#34; aria-label=&#34;Copy code to clipboard&#34; title=&#34;Copy code&#34; hidden&gt;&#xA;    &lt;span class=&#34;active&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 448 512&#34;&gt;&lt;!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --&gt;&lt;path d=&#34;M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z&#34;/&gt;&lt;/svg&gt;&lt;/span&gt;&#xA;    &lt;span&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 448 512&#34;&gt;&lt;!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc. --&gt;&lt;path d=&#34;M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z&#34;/&gt;&lt;/svg&gt;&lt;/span&gt;&#xA;  &lt;/button&gt;&#xA;&lt;/div&gt;&#xA;&#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &#xA;  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; role=&#34;group&#34; aria-label=&#34;Python code&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;is_on_basic_multilingual_plane&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;char&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;char&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;encode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;hex&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(),&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;=&lt;/span&gt; &lt;span class=&#34;mh&#34;&gt;0xFFFF&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&lt;h2 id=&#34;backstory&#34;&gt;&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#backstory&#34; aria-hidden=&#34;true&#34; tabindex=&#34;-1&#34;&gt;&lt;/a&gt;&#xA;  Backstory&#xA;  &lt;a class=&#34;hash&#34; href=&#34;#backstory&#34; aria-label=&#34;Link to this heading&#34; title=&#34;Link to this heading&#34; data-copy-title=&#34;Copy a link to this heading&#34;&gt;&lt;/a&gt;&#xA;&lt;/h2&gt;&lt;p&gt;Recently, I was programmatically moving a few hundred thousand documents to a cloud service when my script caught an error about an invalid document name. Included in the error description was an esoteric &amp;ldquo;clarification&amp;rdquo; that this particular cloud service only supported filenames with characters in the &amp;ldquo;basic multilingual plane&amp;rdquo;.&lt;/p&gt;</description>
      </item>
  </channel>
</rss>
