Skip to content

Issues in redirecting if UTF is present #1

@Vineeth-Mohan

Description

@Vineeth-Mohan

I have installed cmd2

elseql> select _id,Title from algotree
"_id",Title
"gHP4LwszRHW1NSb9xHx_Hg","Liquor is now cheaper than petrol: Bal Thackeray"
"E0fdNWS6Sj-M-bHz0Ufmkw","Wall Street dips on data, Greece; tech weighs"
"jCDOc2ETTdiZj5dY_hjB4g","Pieth Urges FIFA to Take Singular Chance to Reform"
"R9T-Paw_T0OMxWRCvHphMA","Digital Domain: Windows Live Brand Fades Into the Sunset - Digital Domain"
5yiMm2gTSUK2dkXxLyuDnw,"NewsWatch: German stocks lead Europe after confidence data"
W788E6V9S6ebvPUQ9lUgOQ,"Talbots falls 22% in premarket on scuttled deal"
yWvkjP3WQY6sk7dVWMleIA,"Gipsy family made �2m and dodged �500,000 tax"
"oOv5WjY0T_Odw626BP1RKg","UPDATE 1-CVR Energy reappoints CEO to the board"
HlkZkbCRRo67EGPwap5T4A,"China exports show signs of recovery: Report"
UKSn5uYvS5SGtRShRZpQBQ,"Baroness Warsi's west London landlord claims she never paid rent"

elseql> select _id,Title from algotree > file2
Traceback (most recent call last):
File "elseql/elseql.py", line 128, in onecmd
return cmd.Cmd.onecmd(self, s)
File "/usr/local/lib/python2.7/dist-packages/cmd2-0.6.4-py2.7.egg/cmd2.py", line 865, in onecmd
stop = func(statement)
File "elseql/elseql.py", line 92, in do_select
self.search.search('select ' + line)
File "/home/vineeth/elseql/elseql/search.py", line 218, in search
print csvline([.get(x) or _['fields'].get(x) for x in fields])
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 42: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions