<div dir="ltr">Thanks Liviu, <div>So true..The hex codes indeed represented the characters. It was the remote URL which wasn't able to collect/read them.</div><div><br></div><div>Much appreciate your time </div><div>Thanks again.</div><div>Sammy</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 4, 2017 at 3:24 PM, Liviu Chircu <span dir="ltr"><<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p><tt>Well, as Linus nicely put it: "Talk is cheap. Show me the
        code". If you take a look at the hex dump, notice that the "..."
        display characters are actually "</tt><tt>e7928e", twice. I haven't
        double-checked, but I have a pretty good feeling that they
        represent our Chinese symbol. Which should mean that everything
        is okay on the OpenSIPS side.</tt>
      
    </p><span class="">
    <pre class="m_9209862200140028623moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="m_9209862200140028623moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a></pre>
    </span><div><div class="h5"><div class="m_9209862200140028623moz-cite-prefix">On 04.04.2017 20:42, SamyGo wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Liviu,
        <div><br>
          <div>I confirm that the same happening on my side as well. but
            take a look at the last two lines of your tcpdump the
            characters are converted to <b>SIP...XXX...SIP.</b></div>
          <div>In my case the remove web server in URL receives the data
            just as is with dots, like SIP...XXX..SIP , thats the
            problem as I stated. !</div>
          <div><br>
          </div>
          <div>A bit confused, do you mean that conversion of Chinese
            characters to "..." is the right behavior ?</div>
          <div><br>
          </div>
          <div>Looking for some details.</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div>Sammy</div>
          <div><br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Apr 4, 2017 at 9:49 AM, Liviu
          Chircu <span dir="ltr"><<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p><tt>Hi SamyGo,</tt></p>
              <p><tt>The rest_post() function seems to properly put
                  _any_ given bytes on the wire:</tt></p>
              <p><tt>$var(body) = "SIP璎XXX璎SIP";</tt><tt><br>
                </tt><tt>$var(ctype) = "text/plain";</tt><tt><br>
                </tt><tt>rest_post(<a class="m_9209862200140028623m_918013122113637892moz-txt-link-rfc2396E" href="http://127.0.0.1" target="_blank">"http://127.0.0.1"</a>,
                  "$var(body)", "$var(ctype)", "$var(retcode)");</tt></p>
              <p><tt>produces:</tt></p>
              <p><tt>    0x0000:  4500 00a2 67cc 4000 4006 d487 7f00
                  0001  <a class="m_9209862200140028623m_918013122113637892moz-txt-link-abbreviated" href="mailto:E...g.@.@" target="_blank">E...g.@.@</a>.......<br>
                      0x0010:  7f00 0001 8e1d 0050 febf 3131 bf5f d711 
                  .......P..11._..<br>
                      0x0020:  8018 0156 fe96 0000 0101 080a 0142 56fa 
                  ...V.........BV.<br>
                      0x0030:  0142 56fa 504f 5354 202f 2048 5454 502f 
                  .BV.POST./.HTTP/<br>
                      0x0040:  312e 310d 0a48 6f73 743a 2031 3237 2e30 
                  1.1..Host:.127.0<br>
                      0x0050:  2e30 2e31 0d0a 4163 6365 7074 3a20 2a2f 
                  .0.1..Accept:.*/<br>
                      0x0060:  2a0d 0a43 6f6e 7465 6e74 2d54 7970 653a 
                  *..Content-Type:<br>
                      0x0070:  2074 6578 742f 706c 6169 6e0d 0a43 6f6e 
                  .text/plain..Con<br>
                      0x0080:  7465 6e74 2d4c 656e 6774 683a 2031 350d 
                  tent-Length:.15.<br>
                      0x0090:  0a0d 0a53 4950 e792 8e58 5858 e792 8e53 
                  ...SIP...XXX...S<br>
                      0x00a0:  4950                          <wbr>          
                  IP</tt></p>
              <p><tt>The command I used for capturing is:</tt></p>
              <p><tt>tcpdump -nnvvXSs 1514 -i any port 80<br>
                </tt></p>
              <p><tt>Please let me know if behavior differs on your
                  platform.</tt></p>
              <p><tt>Regards,<br>
                </tt></p>
              <pre class="m_9209862200140028623m_918013122113637892moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="m_9209862200140028623m_918013122113637892moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>

OpenSIPS Summit May 2017 Amsterdam
  <a class="m_9209862200140028623m_918013122113637892moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html" target="_blank">http://www.opensips.org/events<wbr>/Summit-2017Amsterdam.html</a></pre><div><div class="m_9209862200140028623h5">
    <div class="m_9209862200140028623m_918013122113637892moz-cite-prefix">On 28.03.2017 19:55, SamyGo wrote:

    </div>
    </div></div><blockquote type="cite"><div><div class="m_9209862200140028623h5">
      <div dir="ltr">Hi,
        <div>

          <div>I've a specific problem with avps containing values in
            language other than English. For example an avp(test)
            holding a Chinese character gets converted to ? while
            passing to some rest_post URL.</div>
          <div>

          </div>
          <div><u>code:</u></div>
          <div>

          </div>
          <div><font face="monospace, monospace">$avp(test) = $fn;</font></div>
          <div><font face="monospace, monospace">xlog("L_INFO","Got
              Display Name: $avp(test) \n");</font></div>
          <div><font face="monospace, monospace">rest_post("$avp(url)","$avp(te<wbr>st)"
              ....);</font></div>
          <div>

          </div>
          <div>

          </div>
          <div>The output in x-log line stays correct but the webserver
            gets the value of $avp(test) converted in "...??.." 

          </div>
          <div>

          </div>
          <div>I've tried to add the charset=utf-8 in the content-type
            header but it doesn't help.</div>
          <div>

          </div>
          <div>Looking forward to get some hints/help on this.</div>
          <div>

          </div>
          <div>Thanks,</div>
          <div>Sammy</div>
          <div>

          </div>
        </div>
      </div>
      

      <fieldset class="m_9209862200140028623m_918013122113637892mimeAttachmentHeader"></fieldset>
      

      </div></div><pre>______________________________<wbr>_________________
Users mailing list
<a class="m_9209862200140028623m_918013122113637892moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_9209862200140028623m_918013122113637892moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    

  </div>


______________________________<wbr>_________________

Users mailing list

<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>

<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>


</blockquote></div>
</div>


<fieldset class="m_9209862200140028623mimeAttachmentHeader"></fieldset>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_9209862200140028623moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_9209862200140028623moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>

</blockquote>
</div></div></div><br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>