develooper Front page | perl.perl5.porters | Postings from December 2010

FYI: The reason there is a UTF8_ALLOW_FE_FF

From:
karl williamson
Date:
December 21, 2010 20:00
Subject:
FYI: The reason there is a UTF8_ALLOW_FE_FF
Message ID:
4D1177B9.7090107@khwilliamson.com
UTF8_ALLOW_FE_FF is used in utf8n_to_uvuni().  Without it, the current 
operation doesn't allow utf8 strings that begin with either 0xFF or 
0xFE.  My earlier speculation was wrong.  These start bytes are needed 
for very large numbers, occupying 32 or more bits.  But the reason is 
that otherwise, no utf8 contains either these two bytes which could be 
mistaken for a UTF16 BOM, and also can conflict with some FTP and Telnet 
control connections.  (all according to Wikipedia)



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