Closed byron222 closed 7 years ago
This is a known limitation, but we possibly have some good news.
Please read more about problem and approaches at https://github.com/welaika/wordmove/wiki/invalid-byte-sequence-in-UTF-8-while-pushing---pulling-db/_edit#use-sqladapterwpcli-experimental
so, there is nothing i can do?
because i already try this
1) Modified/created a
~/.profile'
2) added these two lines to .profile:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
3) source your ~/.profile
source ~/.profile
`
And nothing change.....
ok, i fix this!
i add
sql_content.encode!('UTF-16', 'UTF-8', :invalid => :replace, :replace => '')
sql_content.encode!('UTF-8', 'UTF-16')
sql_content.force_encoding("UTF-8")
to this File,above the line 45
/root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/sql_adapter/default.rb
Dear @byron222,
I assume you haven't read the solution to use wpcli as SqlAdapter described in the wiki page I posted.
Up to you, but keep in mind that approach could corrupt your data. We wrote a specific disclaimer about the choice to not implement such a risky code.
The new SqlAdapter is intended primarily to overcome this kind of problem.
Bye
i try many things but still have this error.
/root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/sql_adapter/default.rb:45:in'
gsub!': invalid byte sequence in UTF-8 (ArgumentError) from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/sql_adapter/default.rb:45:in
serialized_replace!' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/sql_adapter/default.rb:38:inreplace_field!' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/sql_adapter/default.rb:26:in
replace_vhost!' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/sql_adapter/default.rb:18:inadapt!' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/deployer/ssh/default_sql_adapter.rb:42:in
adapt_sql' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/deployer/ssh/default_sql_adapter.rb:30:inadapt_remote_db!' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/deployer/ssh.rb:35:in
pull_db' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/cli.rb:69:inblock in pull' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/cli.rb:37:in
block in handle_options' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/cli.rb:36:ineach' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/cli.rb:36:in
handle_options' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/lib/wordmove/cli.rb:68:inpull' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in
run' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:ininvoke_command' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in
dispatch' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:instart' from /root/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/wordmove-2.1.2/exe/wordmove:6:in
<top (required)>' from /root/.rbenv/versions/2.4.1/bin/wordmove:22:inload' from /root/.rbenv/versions/2.4.1/bin/wordmove:22:in