New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix file cache fail "invalid byte sequence in UTF-8" #724

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@modeverv
Contributor

modeverv commented Nov 18, 2011

when I use Padrino::Cache with Japanese text,
I faced "invalid byte sequence in UTF-8".
I append force encoding to avoid this error.
please check this change.

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Nov 22, 2011

Why in ASCII-8BIT an not in UTF-8 directly? Then can you try with binread ?

DAddYE commented on d2704f9 Nov 22, 2011

Why in ASCII-8BIT an not in UTF-8 directly? Then can you try with binread ?

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Nov 23, 2011

Last question:

  1. What is your Encoding.default_external ? padrino console -> puts Encoding.default_external
  2. The cache file is written correctly in UTF8 ?

DAddYE replied Nov 23, 2011

Last question:

  1. What is your Encoding.default_external ? padrino console -> puts Encoding.default_external
  2. The cache file is written correctly in UTF8 ?
@modeverv

This comment has been minimized.

Show comment
Hide comment
@modeverv

modeverv Nov 23, 2011

Contributor

I tried binread then also disapear errors.
modeverv@bde76f9
thanks a lot.

Contributor

modeverv commented Nov 23, 2011

I tried binread then also disapear errors.
modeverv@bde76f9
thanks a lot.

@DAddYE

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Dec 5, 2011

Member

Last question:

  1. What is your Encoding.default_external ? padrino console -> puts Encoding.default_external
  2. The cache file is written correctly in UTF8 ?
Member

DAddYE commented Dec 5, 2011

Last question:

  1. What is your Encoding.default_external ? padrino console -> puts Encoding.default_external
  2. The cache file is written correctly in UTF8 ?
@modeverv

This comment has been minimized.

Show comment
Hide comment
@modeverv

modeverv Dec 17, 2011

Contributor
  1. What is your Encoding.default_external ? padrino console -> puts Encoding.default_external
    in main.rb file
  get "/" do
    # some code here
    @echo = Encoding.default_external
    erb :index
  end

in index.erb

   Encoding.default_external is <%= @echo %>

Encoding.default_external

  1. The cache file is written correctly in UTF8 ?
    Sorry,I don't know right way that cache file's encoding,
    but open cache file with Emacs with utf8 coding is not scrambled.
    1.opening with emacs => can't determine encoding.
    scrambled
    2.opening with emacs utf8encoding => is not scrambled.
    set coding in emacs
    ok.
    ok!!!!

this is enough answer?

Contributor

modeverv commented Dec 17, 2011

  1. What is your Encoding.default_external ? padrino console -> puts Encoding.default_external
    in main.rb file
  get "/" do
    # some code here
    @echo = Encoding.default_external
    erb :index
  end

in index.erb

   Encoding.default_external is <%= @echo %>

Encoding.default_external

  1. The cache file is written correctly in UTF8 ?
    Sorry,I don't know right way that cache file's encoding,
    but open cache file with Emacs with utf8 coding is not scrambled.
    1.opening with emacs => can't determine encoding.
    scrambled
    2.opening with emacs utf8encoding => is not scrambled.
    set coding in emacs
    ok.
    ok!!!!

this is enough answer?

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Jan 23, 2012

Member

This cache file read now uses binread on 1.9 0de43dc

Member

nesquena commented Jan 23, 2012

This cache file read now uses binread on 1.9 0de43dc

@nesquena nesquena closed this Jan 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment