Revision 922:ad295b270cd4 lib/redmine/scm
| lib/redmine/scm/adapters/abstract_adapter.rb | ||
|---|---|---|
| 242 | 242 |
|
| 243 | 243 |
def scm_iconv(to, from, str) |
| 244 | 244 |
return nil if str.nil? |
| 245 |
return str if to == from |
|
| 245 |
# bug 446: non-utf8 paths in repositories blow up repo viewer and reposman |
|
| 246 |
# -- Remove this short-circuit: we want the conversion to |
|
| 247 |
# happen always, so we can trap the error here if the |
|
| 248 |
# source text happens not to be in the advertised |
|
| 249 |
# encoding (instead of having the database blow up later) |
|
| 250 |
# return str if to == from |
|
| 246 | 251 |
begin |
| 247 | 252 |
Iconv.conv(to, from, str) |
| 248 | 253 |
rescue Iconv::Failure => err |
Also available in: Unified diff