Skip to content

Instantly share code, notes, and snippets.

@takahashim
Created April 29, 2011 03:58
Show Gist options
  • Save takahashim/947810 to your computer and use it in GitHub Desktop.
Save takahashim/947810 to your computer and use it in GitHub Desktop.
diff --git a/parseDVI.rb b/parseDVI.rb
index f565746..be390f5 100644
--- a/parseDVI.rb
+++ b/parseDVI.rb
@@ -145,7 +145,7 @@ while c = b.read(1)
when 239..242
s << {name: :xxx,
k: k = readInt(b, c - 238),
- x: b.read(k)}
+ x: b.read(k).force_encoding('euc-jp').encode('utf-8')}
when 243..246
s << {name: :fnt_def,
k: parseUInt(b.read(c - 242)),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment