develooper Front page | perl.perl5.porters | Postings from October 2018

Re: [perl #133588] Symbol for 'micro' is erroneously uppercased toGreek 'MU'.

Thread Next
"G.W. Haywood" via perl5-porters
October 18, 2018 05:31
Re: [perl #133588] Symbol for 'micro' is erroneously uppercased toGreek 'MU'.
Message ID:
Hi there,

On Mon, 15 Oct 2018, Dan Book via RT wrote:
> G.W. Haywood wrote:
>> The uc() function converts the UTF-8 symbol for 'micro' into an upper
>> case Greek 'mu', which is incorrect.  The 'micro' symbol has no upper
>> case equivalent and should remain unchanged by uc().
> ...
> $ perl -MEncode -E'say sprintf "%vX", uc("\N{U+03BC}")'
> 39C
> $ perl -MEncode -E'say sprintf "%vX", uc("\N{U+00B5}")'
> 39C
> This is correct according to the latest Unicode rules; both U+00B5
> CAPITAL LETTER MU as their uppercase variant.
> ... 
> The second issue you report is a misunderstanding of encoding ...

Thanks for taking the time to look at this and for the clarification.
I agree the original report could have been expressed more clearly.
Let's just say there was some debate at this end about how it should
have been phrased.

The report was about the incorrect treatment of 'micro' as 'mu'.

It seems quite odd that the 'micro sign' should have its own code,
separate from the 'small mu' - because it's a completely different
thing - and then to turn something which expresses a millionth of a
something into something which looks like a million of them just by
treating a 'micro' as if it is a 'mu', which clearly it is not.

If you're saying that Perl does this because that's what the Unicode
rules say it must do then I can understand the dilemma, but AFAICT
it's the only symbol to be abused this way and at the very least it
seems to be a violation of the principle of least astonishment.

I'd be pleased to learn how the sentiment can be passed along to the
maintainers of the Unicode specification for their consideration.



Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About