Actions
Defect #2664
closedMercurial: Repository path encoding of non UTF-8 characters
Start date:
2009-02-04
Due date:
% Done:
100%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Environment¶
- Server OS: Debian Lenny
- Redmine: svn rev 2361 (same problem with 0.8.0)
- Ruby: 1.8.6
- RubyGems: 1.3.1
- Rails: 2.1.2
- PostgreSQL: 8.3.5
- Mercurial: 1.0.1
- System locale: en_us.UTF8
- Database encoding: utf8
- Database locale: fr_FR.UTF8 (same problem with en_us.UTF8)
Error¶
Running: ruby script/runner "Repository.fetch_changesets" -e production
gives the following errors:
/home/redmine/redmine-0.8.0/vendor/rails/railties/lib/commands/runner.rb:47: /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log': RuntimeError: ERROR C22021 Minvalid byte sequence for encoding "UTF8": 0xe97365 HThis error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". Fwchar.c L1545 Rreport_invalid_encoding: INSERT INTO "changes" ("changeset_id", "action", "revision", "branch", "from_path", "path", "from_revision") VALUES(781, E'A', NULL, NULL, NULL, E'/Quantity/doc/Présentation du projet.pdf', NULL) RETURNING "id" (ActiveRecord::StatementInvalid) from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:484:in `execute' from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:929:in `select_raw' from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:916:in `select' from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache' from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `select_all' from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in `select_one' from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value' from /home/redmine/redmine-0.8.0/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:433:in `insert' ... 31 levels... from /home/redmine/redmine-0.8.0/vendor/rails/railties/lib/commands/runner.rb:47 from /home/redmine/apps/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /home/redmine/apps/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from script/runner:3
The error seems quite similar to #834, #917, and #1663 but the error is not appening on the same table. Here, the problem comes from the "changes" table while the already reported (and corrected) issues refer a problem on the "changesets" table.
The problem seems to comes from file path which are not converted to UTF-8 (as we can notice, there is a 'é' character in the file path).
I have tried different encoding in the repository tab settings without success.
Files
Related issues
Actions