[reportlab-users] String shapes and encodings
    Robin Becker 
    robin at reportlab.com
       
    Tue Jun  7 04:40:46 EDT 2022
    
    
  
On 06/06/2022 15:28, Claude Paroz wrote:
> Hi,
> 
> In the spirit of Python3 strings being always Unicode, I think that ReportLab String shape should behave the same and 
> accept only Python strings.
> I admit this might be slightly backwards incompatible, but it could be a first step in string handling simplification in 
> ReportLab. The next step could be a similar patch for platypus Paragraph.
> 
> Claude
I don't think the fact that python regards a specific encoding of glyphs to be strings has much relevance here. Most of 
the external data is in byte form whether encoded as unicode utf8 etc etc.
When python started to provide a unicode encoding of glyphs reportlab had to support them because people wanted to use 
them. Today people still want to use bytes.
If python said it was abandoning byte strings then that would be a reason to drop all support for them. That would 
really annoy the gene analysts though :)
I don't think I would like to apply this patch anytime soon. If others have an opinion please speak up.
-- 
Robin Becker
    
    
More information about the reportlab-users
mailing list