Revision 924:18beae6cb226 lib/redmine/scm/adapters
| lib/redmine/scm/adapters/abstract_adapter.rb | ||
|---|---|---|
| 262 | 262 |
|
| 263 | 263 |
def scm_iconv(to, from, str) |
| 264 | 264 |
return nil if str.nil? |
| 265 |
return str if to == from |
|
| 265 |
# bug 446: non-utf8 paths in repositories blow up repo viewer and reposman |
|
| 266 |
# -- Remove this short-circuit: we want the conversion to |
|
| 267 |
# happen always, so we can trap the error here if the |
|
| 268 |
# source text happens not to be in the advertised |
|
| 269 |
# encoding (instead of having the database blow up later) |
|
| 270 |
# return str if to == from |
|
| 266 | 271 |
begin |
| 267 | 272 |
Iconv.conv(to, from, str) |
| 268 | 273 |
rescue Iconv::Failure => err |
Also available in: Unified diff