Changeset 758


Ignore:
Timestamp:
Aug 12, 2006, 9:52:09 PM (15 years ago)
Author:
joshe
Message:

Use UTF-8 encoded name and paths in torrent file if available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/metainfo.c

    r626 r758  
    220220        int j;
    221221
    222         val = tr_bencDictFind( beInfo, "name" );
     222        val = tr_bencDictFind( beInfo, "name.utf-8" );
     223        if( NULL == val )
     224        {
     225            val = tr_bencDictFind( beInfo, "name" );
     226        }
    223227        strcatUTF8( inf->name, val->val.s.s );
    224228
     
    229233        for( i = 0; i < list->val.l.count; i++ )
    230234        {
    231             val = tr_bencDictFind( &list->val.l.vals[i], "path" );
     235            val = tr_bencDictFind( &list->val.l.vals[i], "path.utf-8" );
     236            if( NULL == val )
     237            {
     238                val = tr_bencDictFind( &list->val.l.vals[i], "path" );
     239            }
    232240            strcatUTF8( inf->files[i].name, inf->name );
    233241            for( j = 0; j < val->val.l.count; j++ )
Note: See TracChangeset for help on using the changeset viewer.