Changeset 6568


Ignore:
Timestamp:
Aug 17, 2008, 9:53:24 PM (13 years ago)
Author:
muks
Message:

Send UTF-8 characters straight out in the JSON without encoding further

The code still handles escaping of control characters and double quotes.

Bugs #1089, #1169 and #1190 may be fixed by this commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r6490 r6568  
    11661166            case '"' : evbuffer_add_printf( data->out, "\\\"" ); break;
    11671167            case '\\': evbuffer_add_printf( data->out, "\\\\" ); break;
    1168             default: {
    1169                 if( isascii( *it ) )
    1170                     evbuffer_add_printf( data->out, "%c", *it );
    1171                 else
    1172                     evbuffer_add_printf( data->out, "\\u%0x", (unsigned int)*it );
    1173                 break;
    1174             }
     1168            default:   evbuffer_add_printf( data->out, "%c", *it );
    11751169        }
    11761170    }
Note: See TracChangeset for help on using the changeset viewer.