develooper Front page | perl.perl5.porters | Postings from August 2017

Re: my_strerror() as API function

Thread Previous | Thread Next
From:
Bo Lindbergh
Date:
August 15, 2017 20:07
Subject:
Re: my_strerror() as API function
Message ID:
3BFBE3A4-2488-4DAA-9C6E-99CC2D1A4AC2@stacken.kth.se
Quoth Karl Williamson:
> I concede that there are encodings that do use the 80-9F range, and these could be wrongly guessed.  The most likely one still in common use is CP 1252.  I did try once to create a string that made sense in both encodings, and I did succeed, but it was quite hard for me to do, and was very short; much shorter than an error message.

Actual, non-synthetic example:
    https://en.wikipedia.org/wiki/Muvrar%C3%A1%C5%A1%C5%A1a

The name "Muvrarášša" can be encoded in Windows-1252 as the octets
(hex) 4D 75 76 72 61 72 E1 9A 9A 61
which is also the correct UTF-8 encoding of the string "Muvrarᚚa",
where the next-to-last character is U+169A OGHAM LETTER PEITH.


/Bo Lindbergh

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About