Commit 301ffcc5 authored by imgqb's avatar imgqb

chinese character

parent c2018418
{jspack} = require 'jspack'
Util = require './util.coffee'
iconv = require 'iconv-lite'
module.exports = class File
FORMATS =
......@@ -41,8 +42,8 @@ module.exports = class File
readString: (length) -> String.fromCharCode.apply(null, @read(length)).replace /\u0000/g, ""
readUnicodeString: (length = null) ->
length or= @readInt()
# new Buffer(@read(length * 2))
@read(length * 2)
iconv.decode(new Buffer(@read(length * 2)),'utf-16be')
# @read(length * 2)
# .map((c) -> Util.getUnicodeCharacter(c))
# .join('')
# .replace(/\u0000/g, '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment