プロジェクト

全般

プロフィール

Vote #73874

完了

Trac importer breaks on exotic filenames and ruby 1.9+

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Importers_15
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
15
version_id:
70
issue_org_id:
13990
author_id:
1188
assigned_to_id:
1188
comments:
1
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

See: http://www.redmine.org/boards/2/topics/31188, also reported in other forum threads and "here":https://github.com/redmine/redmine/pull/6.

The problem is due to the fact that @String#[]@ changed between ruby 1.8 and 1.9. In 1.8 @x[0]@ would return a fixnum representing the character, while it returned the character itself in 1.9 ("1.8 doc":http://ruby-doc.org/core-1.8.7/String.html#method-i-5B-5D, "1.9 doc":http://www.ruby-doc.org/core-1.9.3/String.html#method-i-5B-5D). It's easily explained by the unicode support improvements in 1.9 and the fact that a single 1.9 character can map to multiple codepoints.

The easiest workaround is to let the code as is for 1.8 but only take the first codepoint above (unicode strings can have multiple codepoints per character...).


journals

--------------------------------------------------------------------------------

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0