Are UTF-8 arguments decoded as ISO-8859-1 ?

Poster Content
nk4um Moderator
Posts: 485
June 12, 2010 11:50
Yep, sorry about that glitch. The encoding story was/is a bit more complicated that I anticipated. We had some issues with encoding of plus signs reported by another user and also some issues with the encoding of redirects. Also now we deal with the encoding of query strings too! Each one has slightly different rules.

Oh well, let me know if you see any other issues.

Cheers, Tony
nk4um User
Posts: 111
June 12, 2010 08:28Fixed
Hi,

It seems that you fixed it again. Thanks!

Gregoire
nk4um User
Posts: 111
June 10, 2010 11:25Bug is back
Hi,

Since the latest update, the UTF-8 bug seems to be back.

Grégoire
nk4um User
Posts: 111
May 17, 2010 16:45Fixed!
Latest updates fixed the bug. Thank you very much!
nk4um User
Posts: 111
May 11, 2010 15:25Update?
Hi Peter,

Happy to hear this is indeed a bug (I was not 100% sure). I installed the most recent updates today, but my NetKernel still display the bug. Is this normal?

Regards,
Gregoire
nk4um Moderator
Posts: 755
May 7, 2010 10:01
Hi Gregoire,

Wow this is very timely.  Yesterday I was preparing a note in the newsletter about Internationalized domain names and unicode identifiers in NK.  You''ve actually found an inconsistency in the HTTP transport in NK4.  It turns out that we should be decoding the URL string value before issueing it as a request identifier inside the NK address space.

NK identifiers are all unicode.  So this is a bug between the edge of the two different addressing worlds of the Web and NK.

I''ve got a very simple fix and will do a little testing before posting an update to the http package in the repositories later today.

Thanks for this.  Your timing was perfect.

Peter

PS I know this forum is not good at escaping - its still old code running on an old generation of NK3.  One day we''ll port it to NK4 - just not had time.
nk4um User
Posts: 111
May 6, 2010 21:52Are UTF-8 arguments decoded as ISO-8859-1 ?
Hi,

I have created a web-service "/services/towns" that takes as first argument the name of a town and returns informations about it. This web-service works perfectly when the town''s name contains only ASCII characters (e.g. "localhost:8080/services/towns/Paris").

But when I call the service with a name containing two-bytes UTF8 characters, NetKernel doesn''t glue the two bytes together when it receives it. My "module.xml" contains:

<config>
  <endpoint>
    <grammar>res:/services/towns/
      <groupname="aTownName">
        <regextype="active-escaped-uri-loose" />
      </group>
    </grammar>
    <request>
      <identifier>res:/bogusAddress/[[arg:aTownName]]</identifier>
    </request>
  </endpoint>
</config>


Since I noticed a few days ago that this forum has a bug with the accentuated character in my personal name, I cannot give you a textual example so I did a screenshot :



As you can see, the name of the town in the URL is not correctly displayed in the Exception.

I''ve searched a few hours in the documentation but all I found was that UTF-8 is the default in NetKernel.

This is the same thing with NK 4.0.2 and NK 4.1.

Thanks for your help,
Gregoire