Menu

#196 unindent changes chars

open
nobody
None
5
2004-05-18
2004-05-18
Anonymous
No

When I have in string some national chars (one of few,
that works) and unindent some block of code, national
chars changes to us-ascii. This is does not appears,
when I unindent single line.

I think it is done by module cStringIO, but I don't
explore it too much.

Discussion

  • stano_paska

    stano_paska - 2004-06-01

    Logged In: YES
    user_id=1044977

    Hi it is me again (now logged).

    ##### diff Views/PySourceView.py
    136c136
    < return ['%s%s'%(idntBlock, t) for t in textLst]
    ---
    > return ['%s%s'%(idntBlock,
    t.encode(sys.getdefaultencoding())) for t in textLst]

    ##### diff Views/SourceViews.py
    14c14
    < import time, os
    ---
    > import time, os, sys
    281c281
    < self.ReplaceSelection(text)
    ---
    >
    self.ReplaceSelection(text.decode(sys.getdefaultencoding()))

    this solve problem with displaying characters in editor, but
    when document is saved, report error "invalid syntax" - with
    unicode characters... :(

     
  • stano_paska

    stano_paska - 2004-06-01

    Logged In: YES
    user_id=1044977

    I was stupid. The error in save is my fault. This patch
    works good.
    I was error in indendation with my test file.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.