Skip to content

Instantly share code, notes, and snippets.

@masak
Created May 2, 2013 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masak/5505540 to your computer and use it in GitHub Desktop.
Save masak/5505540 to your computer and use it in GitHub Desktop.
getting "Unaligned end in UTF-8 string" for a file that looks completely legit
$ cat q
<p>59 years ago today, Tenzin Gyatso, the <a href="http://en.wikipedia.org/wiki/Tenzin_Gyatso,_14th_Dalai_Lama">14th Dalai Lama</a>, was enthroned as the leader of Tibet at the age of fifteen. I found the Dalai Lama selection process especially interesting, since it is based on the idea of reincarnation:</p>
<div class='quote'><p>A search party was sent to locate the new incarnation when the boy who was to become the 14th was about two years old. It is said that, amongst other omens, the head of the embalmed body of the thirteenth Dalai Lama, at first facing south-east, had mysteriously turned to face the northeast&#8212;indicating the direction in which his successor would be found. The Regent, Reting Rinpoche, shortly afterwards had a vision at the sacred lake of Lhamo La-tso indicating Amdo as the region to search&#8212;specifically a one-story house with distinctive guttering and tiling. After extensive searching, the Thondup house, with its features resembling those in Reting's vision, was finally found.</p><p>The little boy was presented with various relics, including toys, some of which had belonged to the 13th Dalai Lama and some of which had not. It was reported that he had correctly identified all the items owned by the previous Dalai Lama, exclaiming, "That's mine! That's mine!"</p></div>
<p>The process appears almost scientific in nature, though perhaps not with the same amount of rigour. It also nonsensically reminds me of <a href="http://en.wikipedia.org/wiki/Cinderella#Plot_.28taken_from_Perrault.29">Cinderella</a>:</p>
<div class='quote'><p> Naturally, the slipper fit perfectly, and Cinderella produced the other slipper for good measure.</p></div>
<p>Or perhaps "Star Wars I: The Phantom Menace"; but let's not go there.</p>
<p class='separator'>&#10086;</p>
<p>Today my blogging time got stolen away again, and again <a href="http://twitter.com/dukeleto/status/5809023845">for a very good cause</a>.</p>
<p>But I managed to write a few leap year tests — it being, after all, Temporal Tuesday — and <a href="http://github.com/masak/rakudo/commit/bbd8a1cbf9f7c49f16b1d2604c30c82d1ac42d19">half of them pass</a>, namely the half that checks the behaviour of non-leap years.</p>
$ file q
q: HTML document, UTF-8 Unicode text, with very long lines
$ perl6 -e 'qx[cat q]'
Unaligned end in UTF-8 string
in sub QX at src/gen/CORE.setting:668
in block at -e:1
$ perl6 -v
This is perl6 version 2013.04-25-g639d7f8 built on parrot 5.2.0 revision RELEASE_5_2_0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment