td 0.10.53 → 0.10.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +6 -0
- data/lib/td/command/job.rb +6 -2
- data/lib/td/version.rb +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
data/lib/td/command/job.rb
CHANGED
@@ -260,13 +260,17 @@ module Command
|
|
260
260
|
job.result_each {|row|
|
261
261
|
# TODO limit number of rows to show
|
262
262
|
rows << row.map {|v|
|
263
|
-
# TODO encoding check
|
264
263
|
if v.is_a?(String)
|
265
264
|
s = v.to_s
|
266
265
|
else
|
267
266
|
s = v.to_json
|
268
267
|
end
|
269
|
-
|
268
|
+
# Here does UTF-8 -> UTF-16LE -> UTF8 conversion:
|
269
|
+
# a) to make sure the string doesn't include invalid byte sequence
|
270
|
+
# b) to display multi-byte characters as it is
|
271
|
+
# c) encoding from UTF-8 to UTF-8 doesn't check/replace invalid chars
|
272
|
+
# d) UTF-16LE was slightly faster than UTF-16BE, UTF-32LE or UTF-32BE
|
273
|
+
s = s.encode('UTF-16LE', 'UTF-8', :invalid=>:replace, :undef=>:replace).encode('UTF-8') if s.respond_to?(:encode)
|
270
274
|
s
|
271
275
|
}
|
272
276
|
}
|
data/lib/td/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.54
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|