Changeset ef3cb2648951426660cfa50a6c8f23c0d48a6839
- Timestamp:
- 23/03/07 20:28:48
(2 years ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1174678128 +0000
- git-parent:
[830641e412aa599f0d1568b738214aa9752ade7b]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1174678128 +0000
- Message:
Fixed #949 (UTF-8 url support)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2cb472d |
ref3cb26 |
|
| 125 | 125 | else |
|---|
| 126 | 126 | { |
|---|
| 127 | | for( i = 0; i < strlen( p_str ) + 1; i++ ) // and 0 |
|---|
| | 127 | vlc_iconv_t iconv_handle; |
|---|
| | 128 | size_t i_in = strlen( p_str ); |
|---|
| | 129 | size_t i_out = i_in * 4; |
|---|
| | 130 | char *psz_out, *psz_tmp; |
|---|
| | 131 | uint16_t *pw; |
|---|
| | 132 | |
|---|
| | 133 | psz_out = psz_tmp = malloc( i_out + 1 ); |
|---|
| | 134 | iconv_handle = vlc_iconv_open( "UTF-16LE", "UTF-8" ); |
|---|
| | 135 | vlc_iconv( iconv_handle, &p_str, &i_in, &psz_tmp, &i_out ); |
|---|
| | 136 | vlc_iconv_close( iconv_handle ); |
|---|
| | 137 | psz_tmp[0] = '\0'; |
|---|
| | 138 | psz_tmp[1] = '\0'; |
|---|
| | 139 | |
|---|
| | 140 | for( i = 0; ; i += 2 ) |
|---|
| 128 | 141 | { |
|---|
| 129 | | var_buffer_add16( p_buf, p_str[i] ); |
|---|
| | 142 | uint16_t v = GetWLE( &psz_out[i] ); |
|---|
| | 143 | var_buffer_add16( p_buf, v ); |
|---|
| | 144 | if( !v ) |
|---|
| | 145 | break; |
|---|
| 130 | 146 | } |
|---|
| | 147 | free( psz_out ); |
|---|
| 131 | 148 | } |
|---|
| 132 | 149 | } |
|---|
| ra1d0725 |
ref3cb26 |
|
| 1219 | 1219 | if( i_packet_seq_num != p_sys->i_packet_seq_num ) |
|---|
| 1220 | 1220 | { |
|---|
| | 1221 | #if 0 |
|---|
| 1221 | 1222 | /* FIXME for udp could be just wrong order ? */ |
|---|
| 1222 | 1223 | msg_Warn( p_access, |
|---|
| … | … | |
| 1224 | 1225 | i_packet_seq_num, |
|---|
| 1225 | 1226 | p_sys->i_packet_seq_num ); |
|---|
| 1226 | | p_sys->i_packet_seq_num = i_packet_seq_num; |
|---|
| 1227 | | } |
|---|
| 1228 | | p_sys->i_packet_seq_num++; |
|---|
| | 1227 | #endif |
|---|
| | 1228 | } |
|---|
| | 1229 | p_sys->i_packet_seq_num = i_packet_seq_num + 1; |
|---|
| 1229 | 1230 | |
|---|
| 1230 | 1231 | if( i_packet_id == p_sys->i_header_packet_id_type ) |
|---|