bugThe Circle - Bugs: bug #3830, Bad string->unicode conversions

 
 

bug #3830: Bad string->unicode conversions

Submitted by:  Peter Moulder <pjrm>
Submitted on:  Sat 31 May 2003 07:48:30 AM UTC  
 
Category: Graphical version (circle)Severity: 4
Item Group: BugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 31 May 2003 07:48:30 AM UTC, original submission:

An example of how to trigger this bug is to send some 8-bit text from a gtk1 client to a gtk2 client.
(I'd guess that another example is to send some 8-bit gossip text, etc.: grep force_unicode *y.)

Under the gtk2 client, sys.getdefaultencoding() is returning 'utf-8'. This is used by settings.terminal_encoding, which in turn is used by force_unicode and force_string.

pfh's suggested fix is to set settings.terminal_encoding to 'CP1252' unconditionally. However, he notes that doing so triggers "Augmentation of wrong length" errors. Pfh says this is a separate bug, where augmentation length is number of bytes (presumably of utf-8 encoding) rather than number of characters.

Ryan says that fixing this bug (for the chat message case) also requires the following change:
# Legacy message format
- text = request[3]
+ text = utility.force_unicode(request[3])

Peter Moulder <pjrm>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup1