aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Redon <kevredon@mail.tsaitgaist.info>2013-01-22 15:29:32 +0100
committerKevin Redon <kevredon@mail.tsaitgaist.info>2013-01-22 15:29:32 +0100
commitfd6db3b79e4a7c5a99e49097d5e68b93f15e921e (patch)
tree99902e54fb75fc4d3d92dd8506e067e885a19bf9
parent81db0e7926f29f3ac9bc760ebc2764cdab891ede (diff)
added ruby file encoding utf-8 info, and changed apdu.rb to work with ruby 1.9 encoding (breaks 1.8 compatibility?)
-rwxr-xr-xsrc/apdu_forward.rb1
-rw-r--r--src/copy_client.rb1
-rwxr-xr-xsrc/demo_client.rb1
-rwxr-xr-xsrc/demo_server.rb1
-rw-r--r--src/info_client.rb1
-rw-r--r--src/lib/apdu.rb9
-rw-r--r--src/pcsc_server.rb1
-rw-r--r--src/sap/client.rb1
-rw-r--r--src/sap/common.rb1
-rw-r--r--src/sap/server.rb1
-rw-r--r--src/simos_server.rb1
-rw-r--r--src/tools/bluetooth_sap_serial.rb1
12 files changed, 18 insertions, 2 deletions
diff --git a/src/apdu_forward.rb b/src/apdu_forward.rb
index a7bb014..83974ec 100755
--- a/src/apdu_forward.rb
+++ b/src/apdu_forward.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/copy_client.rb b/src/copy_client.rb
index b01f97b..528849f 100644
--- a/src/copy_client.rb
+++ b/src/copy_client.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/demo_client.rb b/src/demo_client.rb
index bdbcc24..40cb1f3 100755
--- a/src/demo_client.rb
+++ b/src/demo_client.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/demo_server.rb b/src/demo_server.rb
index 7648580..207c804 100755
--- a/src/demo_server.rb
+++ b/src/demo_server.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/info_client.rb b/src/info_client.rb
index 68defdc..b1cda86 100644
--- a/src/info_client.rb
+++ b/src/info_client.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/lib/apdu.rb b/src/lib/apdu.rb
index 9e2904c..750e6ff 100644
--- a/src/lib/apdu.rb
+++ b/src/lib/apdu.rb
@@ -1,3 +1,6 @@
+# encoding: utf-8
+# tested with ruby 1.9.1 and 1.9.3
+# does not work with ruby 1.8.7 anymore
=begin
This file is part of softSIM.
@@ -17,8 +20,10 @@ along with sofSIM. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2011 Kevin "tsaitgaist" Redon kevredon@mail.tsaitgaist.info
=end
# this librarie is to centralise the APDU related work
-$KCODE = 'UTF8'
-require 'jcode'
+
+# required by ruby 1.8, but brakes by 1.9
+#$KCODE = 'UTF8'
+#require 'jcode'
# transform binary string into readable hex string
class String
diff --git a/src/pcsc_server.rb b/src/pcsc_server.rb
index 0174373..4a802e9 100644
--- a/src/pcsc_server.rb
+++ b/src/pcsc_server.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/sap/client.rb b/src/sap/client.rb
index 7b6514e..e89cc07 100644
--- a/src/sap/client.rb
+++ b/src/sap/client.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/sap/common.rb b/src/sap/common.rb
index d544ffa..9054e9f 100644
--- a/src/sap/common.rb
+++ b/src/sap/common.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/sap/server.rb b/src/sap/server.rb
index 74abb7c..f93ac5a 100644
--- a/src/sap/server.rb
+++ b/src/sap/server.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/simos_server.rb b/src/simos_server.rb
index 347ef81..34c1117 100644
--- a/src/simos_server.rb
+++ b/src/simos_server.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
=begin
This file is part of softSIM.
diff --git a/src/tools/bluetooth_sap_serial.rb b/src/tools/bluetooth_sap_serial.rb
index 6415495..2979493 100644
--- a/src/tools/bluetooth_sap_serial.rb
+++ b/src/tools/bluetooth_sap_serial.rb
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
+# encoding: UTF-8
=begin
This file is part of softSIM.