[Nfd-dev] percent(%) sign in ndn::name

Thompson, Jeff jefft0 at remap.ucla.edu
Tue Oct 24 14:10:33 PDT 2017


The Name::Component constructor says “Note that this string will be interpreted as is (i.e.,  it will not be interpreted as URI)"

Try ndn::Name::Component comp(“\xC1.Router”)

If you want the URI syntax, then use the Name constructor and get the component.

ndn::Name::Component comp = ndn::Name("%C1.Router”).get(0);

- Jeff T

From: Nfd-dev <nfd-dev-bounces at lists.cs.ucla.edu<mailto:nfd-dev-bounces at lists.cs.ucla.edu>> on behalf of "Muktadir R Chowdhury (mrchwdhr)" <mrchwdhr at memphis.edu<mailto:mrchwdhr at memphis.edu>>
Date: Tuesday, October 24, 2017 at 14:00:00
To: nfd-dev <nfd-dev at lists.cs.ucla.edu<mailto:nfd-dev at lists.cs.ucla.edu>>
Subject: [Nfd-dev] percent(%) sign in ndn::name


Hi,

When I try to make a ndn::Name::Component out of a string that has percent sign(%), the percent is getting replaced by %25.

For example, ndn::Name::Component comp("%C1.Router") becomes %25C1.Router in comp.toUri().


Does anyone have a workaround?


Muktadir


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20171024/580a88d6/attachment.html>


More information about the Nfd-dev mailing list