Unicode fixes for previewing large datasets.

This commit is contained in:
Daniel Blankenberg
2013-05-09 10:49:02 -04:00
parent 1a338323d4
commit 1c19a78e98
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ class Tabular( data.Text ):
while cursor and ck_data[-1] != '\n':
ck_data += cursor
cursor = f.read(1)
return to_json_string({'ck_data': ck_data, 'ck_index': ck_index+1})
return to_json_string( { 'ck_data': util.unicodify( ck_data ), 'ck_index': ck_index + 1 } )
def display_data(self, trans, dataset, preview=False, filename=None, to_ext=None, chunk=None):
preview = util.string_as_bool( preview )
@@ -10,5 +10,5 @@ ${ render_deleted_data_message( data ) }
</div>
<pre>
${ unicode( truncated_data, 'utf-8' ) | h }
${ util.unicodify( truncated_data ) | h }
</pre>