|
49 | 49 | ucl(B) -> |
50 | 50 | try unicode:characters_to_list(B) of |
51 | 51 | L when is_list(L) -> L; |
52 | | - {error,_Matched,Rest} -> throw({error,{bad_unicode,Rest}}) |
| 52 | + {error,_Matched,_Rest} -> throw({error,bad_unicode}) |
53 | 53 | catch |
54 | 54 | _:_ -> throw({error,bad_unicode}) |
55 | 55 | end. |
@@ -209,12 +209,12 @@ encode(#ssh_msg_disconnect{ |
209 | 209 | encode(#ssh_msg_service_request{ |
210 | 210 | name = Service |
211 | 211 | }) -> |
212 | | - <<?Ebyte(?SSH_MSG_SERVICE_REQUEST), ?Estring_utf8(Service)>>; |
| 212 | + <<?Ebyte(?SSH_MSG_SERVICE_REQUEST), ?Estring(Service)>>; |
213 | 213 |
|
214 | 214 | encode(#ssh_msg_service_accept{ |
215 | 215 | name = Service |
216 | 216 | }) -> |
217 | | - <<?Ebyte(?SSH_MSG_SERVICE_ACCEPT), ?Estring_utf8(Service)>>; |
| 217 | + <<?Ebyte(?SSH_MSG_SERVICE_ACCEPT), ?Estring(Service)>>; |
218 | 218 |
|
219 | 219 | encode(#ssh_msg_ext_info{ |
220 | 220 | nr_extensions = N, |
@@ -377,7 +377,7 @@ decode(<<?BYTE(?SSH_MSG_CHANNEL_REQUEST), ?UINT32(Recipient), |
377 | 377 | try |
378 | 378 | #ssh_msg_channel_request{ |
379 | 379 | recipient_channel = Recipient, |
380 | | - request_type = ?unicode_list(RequestType), |
| 380 | + request_type = binary:bin_to_list(RequestType), |
381 | 381 | want_reply = erl_boolean(Bool), |
382 | 382 | data = Data |
383 | 383 | } |
@@ -407,16 +407,16 @@ decode(<<?BYTE(?SSH_MSG_USERAUTH_REQUEST), |
407 | 407 | Data/binary>>) -> |
408 | 408 | #ssh_msg_userauth_request{ |
409 | 409 | user = ?unicode_list(User), |
410 | | - service = ?unicode_list(Service), |
411 | | - method = ?unicode_list(Method), |
| 410 | + service = binary:bin_to_list(Service), |
| 411 | + method = binary:bin_to_list(Method), |
412 | 412 | data = Data |
413 | 413 | }; |
414 | 414 |
|
415 | 415 | decode(<<?BYTE(?SSH_MSG_USERAUTH_FAILURE), |
416 | 416 | ?DEC_BIN(Auths,__0), |
417 | 417 | ?BYTE(Bool)>>) -> |
418 | 418 | #ssh_msg_userauth_failure { |
419 | | - authentications = ?unicode_list(Auths), |
| 419 | + authentications = binary:bin_to_list(Auths), |
420 | 420 | partial_success = erl_boolean(Bool) |
421 | 421 | }; |
422 | 422 |
|
@@ -530,12 +530,12 @@ decode(<<"ecdh",?BYTE(?SSH_MSG_KEX_ECDH_REPLY), |
530 | 530 |
|
531 | 531 | decode(<<?SSH_MSG_SERVICE_REQUEST, ?DEC_BIN(Service,__0)>>) -> |
532 | 532 | #ssh_msg_service_request{ |
533 | | - name = ?unicode_list(Service) |
| 533 | + name = binary:bin_to_list(Service) |
534 | 534 | }; |
535 | 535 |
|
536 | 536 | decode(<<?SSH_MSG_SERVICE_ACCEPT, ?DEC_BIN(Service,__0)>>) -> |
537 | 537 | #ssh_msg_service_accept{ |
538 | | - name = ?unicode_list(Service) |
| 538 | + name = binary:bin_to_list(Service) |
539 | 539 | }; |
540 | 540 |
|
541 | 541 | decode(<<?BYTE(?SSH_MSG_DISCONNECT), ?UINT32(Code), ?DEC_BIN(Desc,__0), ?DEC_BIN(Lang,__1)>>) -> |
|
0 commit comments