Author vstinner
Recipients amaury.forgeotdarc, ocean-city, vstinner
Date 2009-03-15.14:56:06
SpamBayes Score 7.23904e-08
Marked as misclassified No
Message-id <1237128968.85.0.800917197996.issue2382@psf.upfronthosting.co.za>
In-reply-to
Content
This issue is a problem of units. The error text is an utf8 *byte* 
string and offset is a number of *bytes*. The goal is to get the text 
*width* of a *character* string. We have to:
 1- convert offset from bytes number to character number
 2- get the error message as (unicode) characters
 3- get the width of text[:offset]

It's already possible to get (2) from the utf8 string, and code from 
ocean-city's patch (py3k_adjust_cursor_at_syntax_error_v2.patch) can 
be used for (3). The most difficult point is (1).

I will try to implement that.
History
Date User Action Args
2009-03-15 14:56:09vstinnersetrecipients: + vstinner, amaury.forgeotdarc, ocean-city
2009-03-15 14:56:08vstinnersetmessageid: <1237128968.85.0.800917197996.issue2382@psf.upfronthosting.co.za>
2009-03-15 14:56:07vstinnerlinkissue2382 messages
2009-03-15 14:56:06vstinnercreate