<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">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:<br>
</div>
<blockquote type="cite"
cite="mid:f09c0070a3af4981973803ad70bee765@ndph.ox.ac.uk">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}@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;}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.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-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}ol
        {margin-bottom:0cm;}ul
        {margin-bottom:0cm;}</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]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">I’m seeing some
progress…nvarchar stores Unicode points as UTF-8.<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">And:<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif">The UTF-8 encoding of mu (</span>U+03BC)
<span style="font-size:12.0pt;font-family:"Times New
Roman",serif">is 0xCE 0xBC</span><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><a class="moz-txt-link-freetext" 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><o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif">Also the UTF-8 encoding of mu(</span>U+00B5)
is
<span style="font-size:12.0pt;font-family:"Times New
Roman",serif">0xC2 0xB5<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><a class="moz-txt-link-freetext" 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><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">So we have two
Unicode code points for mu…why I know not.<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">And I still
don’t know how to get them to equate.<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
style="mso-fareast-language:EN-GB" lang="EN-US">From:</span></b><span
style="mso-fareast-language:EN-GB" lang="EN-US"> Tony
Douglas <a class="moz-txt-link-rfc2396E" 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 class="moz-txt-link-rfc2396E" href="mailto:martin.bowes@ndph.ox.ac.uk"><martin.bowes@ndph.ox.ac.uk></a><br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a><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>
<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"
moz-do-not-send="true">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) ?<span
style="font-size:12.0pt;mso-fareast-language:EN-GB"><o:p></o:p></span></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>
<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"
moz-do-not-send="true">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"> <span
style="font-size:12.0pt;font-family:"Times New
Roman",serif;mso-fareast-language:EN-GB">
<o:p></o:p></span></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;font-family:"Times New
Roman",serif;mso-fareast-language:EN-GB">_______________________________________________<br>
Info-ingres mailing list<br>
<a href="mailto:Info-ingres@lists.planetingres.org"
moz-do-not-send="true">Info-ingres@lists.planetingres.org</a><br>
<a
href="https://lists.planetingres.org/mailman/listinfo/info-ingres"
moz-do-not-send="true">https://lists.planetingres.org/mailman/listinfo/info-ingres</a><o:p></o:p></span></p>
</div>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Info-ingres mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a>
<a class="moz-txt-link-freetext" href="https://lists.planetingres.org/mailman/listinfo/info-ingres">https://lists.planetingres.org/mailman/listinfo/info-ingres</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>