Sha256: 8315141257faa9fe8fd7fdfff63816746935e9d113507892b79e4cfe17e6130c

Contents?: true

Size: 452 Bytes

Versions: 100

Compression:

Stored size: 452 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'test_helper'
require 'hexapdf/utils/pdf_doc_encoding'

describe HexaPDF::Utils::PDFDocEncoding do
  before do
    @obj = HexaPDF::Utils::PDFDocEncoding
  end

  describe "convert_to_utf8" do
    it "converts the given string to UTF-8" do
      result = @obj.convert_to_utf8("Testing\x9c\x92".b)
      assert_equal(Encoding::UTF_8, result.encoding)
      assert_equal("Testing\u0153\u2122", result)
    end
  end
end

Version data entries

100 entries across 100 versions & 1 rubygems

Version Path
hexapdf-1.2.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-1.1.1 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-1.1.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-1.0.3 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-1.0.2 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-1.0.1 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-1.0.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.47.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.46.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.45.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.44.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.41.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.40.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.39.1 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.39.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.38.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.37.2 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.37.1 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.37.0 test/hexapdf/utils/test_pdf_doc_encoding.rb
hexapdf-0.36.0 test/hexapdf/utils/test_pdf_doc_encoding.rb