<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:"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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
@font-face
        {font-family:"Times New Roman \,serif";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;
        mso-fareast-language:EN-US;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-US;}
span.EmailStyle25
        {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:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Yeah, that’s the idea I’ve explored with the user. It’s amazing what you can do with the replace function.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Something a bit more general may still be required as I’m pretty well guaranteed to bump into this elsewhere.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Marty<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Paul A. <paul@ipauland.com>
<br>
<b>Sent:</b> 17 June 2021 15:21<br>
<b>To:</b> info-ingres@lists.planetingres.org<br>
<b>Subject:</b> Re: [Info-ingres] Micro-madness<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Choose one representation and change the codes, use an insert/modify rule to force consistency?<br>
<br>
On 17/06/2021 14:17, Martin Bowes wrote:<span style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D">I’m seeing some progress…nvarchar stores Unicode points as UTF-8.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">And:</span><o:p></o:p></p>
<p class="MsoPlainText"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif">The UTF-8 encoding of mu (</span>U+03BC)
<span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif">is 0xCE 0xBC</span><o:p></o:p></p>
<p class="MsoPlainText"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif"><a href="https://www.utf8-chartable.de/unicode-utf8-table.pl?start=896&number=128&names=-&utf8=0x">https://www.utf8-chartable.de/unicode-utf8-table.pl?start=896&number=128&names=-&utf8=0x</a></span><o:p></o:p></p>
<p class="MsoPlainText"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif">Also the UTF-8 encoding of mu(</span>U+00B5) is
<span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif">0xC2 0xB5</span><o:p></o:p></p>
<p class="MsoPlainText"><span style="font-size:12.0pt;font-family:"Times New Roman ,serif",serif"><a href="https://www.utf8-chartable.de/unicode-utf8-table.pl?start=128&number=128&names=-&utf8=0x">https://www.utf8-chartable.de/unicode-utf8-table.pl?start=128&number=128&names=-&utf8=0x</a></span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">So we have two Unicode code points for mu…why I know not.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">And I still don’t know how to get them to equate.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Marty</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Tony Douglas
<a href="mailto:tonyd08068@netscape.net"><tonyd08068@netscape.net></a> <br>
<b>Sent:</b> 17 June 2021 14:05<br>
<b>To:</b> Martin Bowes <a href="mailto:martin.bowes@ndph.ox.ac.uk"><martin.bowes@ndph.ox.ac.uk></a><br>
<b>Cc:</b> <a href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a><br>
<b>Subject:</b> Re: [Info-ingres] Micro-madness</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Unicode…. There be dragons. Might be something to do with normalisation form - NFC and NFD say how codes can combine to form different characters - this page <a href="https://www.win.tue.nl/~aeb/linux/uc/nfc_vs_nfd.html">https://www.win.tue.nl/~aeb/linux/uc/nfc_vs_nfd.html</a> might
help, or it might not - I was just about getting unconfused with the terminology of Unicode when I stopped looking at it a few years ago :( But weird things could happen. Have you tried a UTF8 client to see what happens (assuming you’ve got an installation
where transliteration is available) ?<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Looking forward to seeing how this pans out !<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">- Tony<o:p></o:p></p>
<div>
<p class="MsoNormal">Sent from my iPhone<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">On 17 Jun 2021, at 13:54, Martin Bowes <<a href="mailto:martin.bowes@ndph.ox.ac.uk">martin.bowes@ndph.ox.ac.uk</a>> wrote:<o:p></o:p></p>
</blockquote>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Can someone please explain this one…please use small words…<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">My Linux installation is an ISO-8859-1 charset. We have a table which has an nvarchar(20) column.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Now the Greek mu symbol is U+00B5, a capital-A with a circumflex is 00C2, The ¼ is U+00BC, and a capital-I with a circumflex is U+00CE.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">And in <u>terminal monitor</u> connection, how does this work…<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">select U&'\00c2', U&'\00b5',
<span style="background:yellow;mso-highlight:yellow">U&'\00c2\00b5'</span>\g</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">┌──────┬──────┬──────┐</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│col1 │col2 │col3 │</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">├──────┼──────┼──────┤</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│▒ │▒ │µ │</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">└──────┴──────┴──────┘</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">(1 row)</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">select u&'\00ce', u&'\00bc',
<span style="background:yellow;mso-highlight:yellow">u&'\00ce\00bc</span>'\g</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">┌──────┬──────┬──────┐</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│col1 │col2 │col3 │</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">├──────┼──────┼──────┤</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│▒ │▒ │μ │</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">└──────┴──────┴──────┘</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">(1 row)</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">So two weird codes have both combined to make a mu. I didn’t just invent these. I got them from two distinct data sets which were being compared.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">And they are clearly not the same thing.<o:p></o:p></p>
<p class="MsoPlainText"><span style="font-size:10.0pt;font-family:"Lucida Console"">create table test(id integer1, a nvarchar(20));</span><o:p></o:p></p>
<p class="MsoPlainText"><span style="font-size:10.0pt;font-family:"Lucida Console"">insert into test values (1, U&'\00c2\00b5'), (2, U&'\00ce\00bc');</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">select * from test\g</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">┌──────┬────────────────────────────────────────┐</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│id │a │</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">├──────┼────────────────────────────────────────┤</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│ 1│µ │</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│ 2│μ │</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">└──────┴────────────────────────────────────────┘</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">(2 rows)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console""> </span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">select a, count(1) from test group by a\g</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">┌────────────────────────────────────────┬─────────────┐</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│a │col2 │</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">├────────────────────────────────────────┼─────────────┤</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│µ │ 1│</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">│μ │ 1│</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">└────────────────────────────────────────┴─────────────┘</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Lucida Console"">(2 rows)</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">So could someone please explain this, and also how I can write some code which will say these two mu’s are the same thing.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Marty<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">_______________________________________________<br>
Info-ingres mailing list<br>
<a href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a><br>
<a href="https://lists.planetingres.org/mailman/listinfo/info-ingres">https://lists.planetingres.org/mailman/listinfo/info-ingres</a></span><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Info-ingres mailing list<o:p></o:p></pre>
<pre><a href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a><o:p></o:p></pre>
<pre><a href="https://lists.planetingres.org/mailman/listinfo/info-ingres">https://lists.planetingres.org/mailman/listinfo/info-ingres</a><o:p></o:p></pre>
</blockquote>
<p><o:p> </o:p></p>
</div>
</body>
</html>