snmp octe string utf编码 传输多国文字

    xiaoxiao2022-06-23  33

    由于需要,snmp管理端需要发送土耳其文字到snmp代理,snmp在发送前选择了做编码处理。采用utf-8.

    管理端发送Çine hoşgeldiniz(welcome  to china)。

     byte[] uncod=Encoding.UTF8.GetBytes(tbxMulti.Text);  msg = Convert.ToBase64String(uncod);

     byte[] buf = Convert.FromBase64String(m[1]);  mmyUI.msg = Encoding.UTF8.GetString(buf, 0, buf.Length);

    转载请注明原文地址: https://ju.6miu.com/read-1123496.html

    最新回复(0)