1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Index: /Users/duff/Library/Application Support/TextMate/Bundles/SQL.tmbundle/Support/bin/db_browser.rb
===================================================================
@@ -3,6 +3,7 @@
require 'optparse'
require 'ostruct'
require 'erb'
+require 'iconv'
require File.dirname(__FILE__) + '/db_browser_lib'
require 'cgi'
require "#{ENV["TM_SUPPORT_PATH"]}/lib/web_preview" if ENV["TM_SUPPORT_PATH"]
@@ -134,6 +135,11 @@
def format(content, type)
return '' unless content
+ begin
+ Iconv.iconv('utf-8', 'utf-8', content)
+ rescue Exception => e
+ content = '(unknown encoding)'
+ end
if type == :number
content
else
|