[pypy-dev] Making the most of internal UTF8

Matt Billenstein matt at vazor.com
Thu Feb 27 13:10:35 EST 2020


On Thu, Feb 27, 2020 at 11:54:45AM -0600, Jerry Spicklemire wrote:
> Thanks for all the replies.
> Dan, re:
> 
> "I think you mostly don't want u'foo' in 3.x or b'foo' in 2.x"
> 
> Actually, I don't want either, anywhere.
> 
> If UTF8 is used internally, and ASCII is
> already UTF8, then it is all UTF8, so ...

If you're not writing libs, you only need b'' in Python3 -- bytes and
binary data is not utf8; you need bytes for files, networks,
compression, etc and in Python3 you'll get errors where you try to use
strings in places that need bytes...

I think the time where you could work just in ascii is pretty much gone
-- even in the US, people use emoji all over the place now, and you can
only store such things using some form of unicode.

m

-- 
Matt Billenstein
matt at vazor.com
http://www.vazor.com/


More information about the pypy-dev mailing list