[TxMt] [SpreadSheet] Accented letter breaks alignment
Hans-Jörg Bibiko
bibiko at eva.mpg.de
Wed Jun 6 16:10:16 UTC 2007
On 06.06.2007, at 17:22, Allan Odgaard wrote:
> On 5. Jun 2007, at 23:56, Édouard Gilbert wrote:
>
>> I'm currently woking on a small spreadsheet in TM, and some of my
>> column alignment is broken. I think it's due to accented letter.
>> My text encoding is UTF-8.
>>
>> I don't know if I'm doing something wrong or if it's a bug. But in
>> both case, the mailing list is probably a good way to get more
>> information.
>
> Steps to reproduce the problem?
>
New Spreadsheet Example:
|mike| 1| 3| 0|
|jörg| 4| 2| 0|
% D1 := SUM(B1:C1)
% D2 := SUM(B2:C2)
press APPLE+R
and you will see
|mike | 1| 3|4.0|
|jörg | 4| 2|6.0|
% D1 := SUM(B1:C1)
% D2 := SUM(B2:C2)
The problem is the ljust method in spreadsheetTool.rb:158. It doesn't
support utf-8 strings.
Suggestion:
158: row[i] = row[i] + " "*(columnWidths[i]-row[i].split(//u).size)
or define a own method for uft8_ljust.
Cheers,
Hans
More information about the textmate
mailing list