You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Troy Harris <tr...@gmail.com> on 2009/03/02 07:07:57 UTC

Encoded UTF16 json response

Hi,

Im having trouble viewing a Response which is chunked UTF-16. View results
tree displays
encoded text which I cant use. If I Save Response to a file it appears as
expected in notepad (notepad++ displays NUL after
each character).

Am I missing a config option to allow the UTF-16 reponse to be displayed?
Should I be able to extract a variable out of the saved file even though its
UTF-16?


Response headers:
HTTP/1.1 200 OK
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-16
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
Set-Cookie:
SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
X-Powered-By: ASP.NET
Date: Mon, 02 Mar 2009 05:35:05 GMT



Thanks for your help.

Troy

-- 
NOTICE:
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential. If you are not the intended recipient
please advise the sender by return email, do not use or disclose the
contents, and delete the message and any attachments from your system.

Re: Encoded UTF16 json response

Posted by Troy Harris <tr...@gmail.com>.
Sebb,

Thank you for working through this issue with me. Our dev team
have switched the response to UTF-8 and I'm able to use
the regular expression extractor to grab required info from the
jqGrid created links.

Regards,
Troy

2009/3/9 sebb <se...@gmail.com>

> On 05/03/2009, sebb <se...@gmail.com> wrote:
> > On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
> >  > 2009/3/5 sebb <se...@gmail.com>
> >  >
> >  >  > On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
> >  >  > > 2009/3/5 sebb <se...@gmail.com>
> >  >  > >
> >  >  > >
> >  >  > >  > On 02/03/2009, Troy Harris <tr...@gmail.com> wrote:
> >  >  > >  > > Hi,
> >  >  > >  > >
> >  >  > >  > >  Im having trouble viewing a Response which is chunked
> UTF-16. View
> >  >  > >  > results
> >  >  > >  > >  tree displays encoded text which I cant use.
> >  >  > >  >
> >  >  > >  > I doubt that the chunking makes any difference.
> >  >  > >  >
> >  >  > >  > JMeter uses Java HTML document to display the response. I
> don't know
> >  >  > >  > if it can handle UTF-16.
> >  >  > >  >
> >  >  > >  > >  If I Save Response to a file it appears as
> >  >  > >  > >  expected in notepad (notepad++ displays NUL after
> >  >  > >  > >  each character).
> >  >  > >  >
> >  >  > >  > That's not proof that the contents are OK - do you not have an
> >  >  > >  > application that can display the data properly?
> >  >  > >  >
> >  >  > >
> >  >  > >
> >  >  > > Yes, the browser - FF/IE7. Once this page hits the browser the
> jqGrid
> >  >  > loads
> >  >  > >  with data.
> >  >  > >
> >  >  >
> >  >  > So does it display correctly if the browser uses the copy
> downloaded
> >  >  > using "Save Response to a file"?
> >  >  >
> >  >
> >  >
> >  > The downloaded copy saves as "response.json" which the jqGrid AJAX
> uses to
> >  >  generate
> >  >  the grid.
> >  >
> >  >
> >  >  >
> >  >  > You may need to save the HTML page and edit it to retrieve the data
> >  >  > locally.
> >  >  >
> >  >
> >  >
> >  > Not a lot of time to attempt this at the moment. But next allocated
> round I
> >  >  could
> >  >  give it a try.
> >
> >
> > No point, given that the local file is processed OK. I assumed that it
> >  might be necessary to tweak the HTML to do so but it seems not.
> >
> >
> >  >
> >  >  >
> >  >  > This would show if the data is downloaded OK, i.e. the problem is
> >  >  > purely that the Tree View Listener cannot handle UTF-16.
> >  >  >
> >  >  > By the way, which Response Data pane option were you using?
> >  >  >
> >  >  > Show Text/Render HTML/Render XML/Render JSON ?
> >  >  >
> >  >  > Do some work and not others?
> >  >  >
> >  >
> >  > > They all display the same content except for Render XML.
> >  >
> >  >  The reponse displayed via View Results tree
> >  >  http://img15.imageshack.us/img15/6953/jmeterutf16response.jpg
> >  >
> >
> >
> > I see - not very useful...
> >
> >  Would you be able to send me (privately) one of the json files?
> >
>
> Thanks for the file.
>
> It looks like the problem is that the charset is wrong - as far as I
> can tell, the data is encoded in UTF-16LE and there is no BOM (byte
> order mark), yet the charset is UTF-16.
>
> This means that the code cannot tell if the data is LE (little-endian)
> or BE (big-endian), so it does not interpret UTF-16 correctly.
>
> If the server is fixed to send the charset UTF-16LE (or add the
> appropriate BOM) then you should find that the display looks OK.
>
> >  >
> >  >  >
> >  >  > >
> >  >  > >  > >  Am I missing a config option to allow the UTF-16 reponse to
> be
> >  >  > >  > displayed?
> >  >  > >  >
> >  >  > >  > No.
> >  >  > >  >
> >  >  > >  > >  Should I be able to extract a variable out of the saved
> file even
> >  >  > though
> >  >  > >  > its
> >  >  > >  > >  UTF-16?
> >  >  > >  >
> >  >  > >  > No, you cannot extract variables out of saved files - UTF-16
> or
> >  >  > otherwise.
> >  >  > >  >
> >  >  > >  > However, you should be able to extract variables out of the
> response
> >  >  > data.
> >  >  > >  >
> >  >  > >  > >
> >  >  > >  > >  Response headers:
> >  >  > >  > >  HTTP/1.1 200 OK
> >  >  > >  > >  Cache-Control: private
> >  >  > >  > >  Transfer-Encoding: chunked
> >  >  > >  > >  Content-Type: application/json; charset=utf-16
> >  >  > >  > >  Server: Microsoft-IIS/7.0
> >  >  > >  > >  X-AspNet-Version: 2.0.50727
> >  >  > >  > >  Set-Cookie:
> >  >  > >  > >
> >  >  > >  >
> >  >  >
>  SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
> >  >  > >  > >  expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
> >  >  > >  > >  X-Powered-By: ASP.NET
> >  >  > >  > >  Date: Mon, 02 Mar 2009 05:35:05 GMT
> >  >  > >  > >
> >  >  > >  > >
> >  >  > >  > >
> >  >  > >  > >  Thanks for your help.
> >  >  > >  >
> >  >  > >  > Is there a publically accessible page that returns data
> encoded in
> >  >  > this
> >  >  > >  > way?
> >  >  > >  >
> >  >  > >
> >  >  > >
> >  >  > > Not at the moment, software is in development stage.
> >  >  > >
> >  >  > >
> >  >  > >  >
> >  >  > >  > Does JMeter work OK for you if the encoding is set to UTF-8
> (assuming
> >  >  > >  > that there are such pages on the server under test)?
> >  >  > >  >
> >  >  > >
> >  >  > >
> >  >  > > I have the Developers changing the reponse to UTF-8 in the next
> build so
> >  >  > >  hopefully
> >  >  > >  the issue wont occur. I'll update the post then.
> >  >  >
> >  >  > OK, unless the pages really need UTF-16 it is probably better to
> use
> >  >  > UTF-8 as the pages will usually be somewhat smaller.
> >  >  >
> >  >  > >  Thanks for your help Seb
> >  >  > >
> >  >  > >
> >  >  > >
> >  >  > >  >
> >  >  > >  > >  Troy
> >  >  > >  > >
> >  >  > >  > >
> >  >  > >  > >  --
> >  >  > >  > >  NOTICE:
> >  >  > >  > >  This e-mail message is intended only for the addressee(s)
> and
> >  >  > contains
> >  >  > >  > >  information which may be confidential. If you are not the
> intended
> >  >  > >  > recipient
> >  >  > >  > >  please advise the sender by return email, do not use or
> disclose
> >  >  > the
> >  >  > >  > >  contents, and delete the message and any attachments from
> your
> >  >  > system.
> >  >  > >  > >
> >  >  > >  >
> >  >  > >
> >  >  > > >
> ---------------------------------------------------------------------
> >  >  > >  > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> >  >  > >  > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >  >  > >  >
> >  >  > >  >
> >  >  > >
> >  >  > >
> >  >  > >
> >  >  > >  --
> >  >  > >
> >  >  > > NOTICE:
> >  >  > >  This e-mail message is intended only for the addressee(s) and
> contains
> >  >  > >  information which may be confidential. If you are not the
> intended
> >  >  > recipient
> >  >  > >  please advise the sender by return email, do not use or disclose
> the
> >  >  > >  contents, and delete the message and any attachments from your
> system.
> >  >  > >
> >  >  >
> >  >  >
> ---------------------------------------------------------------------
> >  >  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >  >  > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >  >  >
> >  >  >
> >  >
> >  >
> >  >  --
> >  >  NOTICE:
> >  >  This e-mail message is intended only for the addressee(s) and
> contains
> >  >  information which may be confidential. If you are not the intended
> recipient
> >  >  please advise the sender by return email, do not use or disclose the
> >  >  contents, and delete the message and any attachments from your
> system.
> >  >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


-- 
NOTICE:
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential. If you are not the intended recipient
please advise the sender by return email, do not use or disclose the
contents, and delete the message and any attachments from your system.

Re: Encoded UTF16 json response

Posted by sebb <se...@gmail.com>.
On 05/03/2009, sebb <se...@gmail.com> wrote:
> On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
>  > 2009/3/5 sebb <se...@gmail.com>
>  >
>  >  > On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
>  >  > > 2009/3/5 sebb <se...@gmail.com>
>  >  > >
>  >  > >
>  >  > >  > On 02/03/2009, Troy Harris <tr...@gmail.com> wrote:
>  >  > >  > > Hi,
>  >  > >  > >
>  >  > >  > >  Im having trouble viewing a Response which is chunked UTF-16. View
>  >  > >  > results
>  >  > >  > >  tree displays encoded text which I cant use.
>  >  > >  >
>  >  > >  > I doubt that the chunking makes any difference.
>  >  > >  >
>  >  > >  > JMeter uses Java HTML document to display the response. I don't know
>  >  > >  > if it can handle UTF-16.
>  >  > >  >
>  >  > >  > >  If I Save Response to a file it appears as
>  >  > >  > >  expected in notepad (notepad++ displays NUL after
>  >  > >  > >  each character).
>  >  > >  >
>  >  > >  > That's not proof that the contents are OK - do you not have an
>  >  > >  > application that can display the data properly?
>  >  > >  >
>  >  > >
>  >  > >
>  >  > > Yes, the browser - FF/IE7. Once this page hits the browser the jqGrid
>  >  > loads
>  >  > >  with data.
>  >  > >
>  >  >
>  >  > So does it display correctly if the browser uses the copy downloaded
>  >  > using "Save Response to a file"?
>  >  >
>  >
>  >
>  > The downloaded copy saves as "response.json" which the jqGrid AJAX uses to
>  >  generate
>  >  the grid.
>  >
>  >
>  >  >
>  >  > You may need to save the HTML page and edit it to retrieve the data
>  >  > locally.
>  >  >
>  >
>  >
>  > Not a lot of time to attempt this at the moment. But next allocated round I
>  >  could
>  >  give it a try.
>
>
> No point, given that the local file is processed OK. I assumed that it
>  might be necessary to tweak the HTML to do so but it seems not.
>
>
>  >
>  >  >
>  >  > This would show if the data is downloaded OK, i.e. the problem is
>  >  > purely that the Tree View Listener cannot handle UTF-16.
>  >  >
>  >  > By the way, which Response Data pane option were you using?
>  >  >
>  >  > Show Text/Render HTML/Render XML/Render JSON ?
>  >  >
>  >  > Do some work and not others?
>  >  >
>  >
>  > > They all display the same content except for Render XML.
>  >
>  >  The reponse displayed via View Results tree
>  >  http://img15.imageshack.us/img15/6953/jmeterutf16response.jpg
>  >
>
>
> I see - not very useful...
>
>  Would you be able to send me (privately) one of the json files?
>

Thanks for the file.

It looks like the problem is that the charset is wrong - as far as I
can tell, the data is encoded in UTF-16LE and there is no BOM (byte
order mark), yet the charset is UTF-16.

This means that the code cannot tell if the data is LE (little-endian)
or BE (big-endian), so it does not interpret UTF-16 correctly.

If the server is fixed to send the charset UTF-16LE (or add the
appropriate BOM) then you should find that the display looks OK.

>  >
>  >  >
>  >  > >
>  >  > >  > >  Am I missing a config option to allow the UTF-16 reponse to be
>  >  > >  > displayed?
>  >  > >  >
>  >  > >  > No.
>  >  > >  >
>  >  > >  > >  Should I be able to extract a variable out of the saved file even
>  >  > though
>  >  > >  > its
>  >  > >  > >  UTF-16?
>  >  > >  >
>  >  > >  > No, you cannot extract variables out of saved files - UTF-16 or
>  >  > otherwise.
>  >  > >  >
>  >  > >  > However, you should be able to extract variables out of the response
>  >  > data.
>  >  > >  >
>  >  > >  > >
>  >  > >  > >  Response headers:
>  >  > >  > >  HTTP/1.1 200 OK
>  >  > >  > >  Cache-Control: private
>  >  > >  > >  Transfer-Encoding: chunked
>  >  > >  > >  Content-Type: application/json; charset=utf-16
>  >  > >  > >  Server: Microsoft-IIS/7.0
>  >  > >  > >  X-AspNet-Version: 2.0.50727
>  >  > >  > >  Set-Cookie:
>  >  > >  > >
>  >  > >  >
>  >  >  SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
>  >  > >  > >  expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
>  >  > >  > >  X-Powered-By: ASP.NET
>  >  > >  > >  Date: Mon, 02 Mar 2009 05:35:05 GMT
>  >  > >  > >
>  >  > >  > >
>  >  > >  > >
>  >  > >  > >  Thanks for your help.
>  >  > >  >
>  >  > >  > Is there a publically accessible page that returns data encoded in
>  >  > this
>  >  > >  > way?
>  >  > >  >
>  >  > >
>  >  > >
>  >  > > Not at the moment, software is in development stage.
>  >  > >
>  >  > >
>  >  > >  >
>  >  > >  > Does JMeter work OK for you if the encoding is set to UTF-8 (assuming
>  >  > >  > that there are such pages on the server under test)?
>  >  > >  >
>  >  > >
>  >  > >
>  >  > > I have the Developers changing the reponse to UTF-8 in the next build so
>  >  > >  hopefully
>  >  > >  the issue wont occur. I'll update the post then.
>  >  >
>  >  > OK, unless the pages really need UTF-16 it is probably better to use
>  >  > UTF-8 as the pages will usually be somewhat smaller.
>  >  >
>  >  > >  Thanks for your help Seb
>  >  > >
>  >  > >
>  >  > >
>  >  > >  >
>  >  > >  > >  Troy
>  >  > >  > >
>  >  > >  > >
>  >  > >  > >  --
>  >  > >  > >  NOTICE:
>  >  > >  > >  This e-mail message is intended only for the addressee(s) and
>  >  > contains
>  >  > >  > >  information which may be confidential. If you are not the intended
>  >  > >  > recipient
>  >  > >  > >  please advise the sender by return email, do not use or disclose
>  >  > the
>  >  > >  > >  contents, and delete the message and any attachments from your
>  >  > system.
>  >  > >  > >
>  >  > >  >
>  >  > >
>  >  > > > ---------------------------------------------------------------------
>  >  > >  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  >  > >  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >  > >  >
>  >  > >  >
>  >  > >
>  >  > >
>  >  > >
>  >  > >  --
>  >  > >
>  >  > > NOTICE:
>  >  > >  This e-mail message is intended only for the addressee(s) and contains
>  >  > >  information which may be confidential. If you are not the intended
>  >  > recipient
>  >  > >  please advise the sender by return email, do not use or disclose the
>  >  > >  contents, and delete the message and any attachments from your system.
>  >  > >
>  >  >
>  >  > ---------------------------------------------------------------------
>  >  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  >  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >  >
>  >  >
>  >
>  >
>  >  --
>  >  NOTICE:
>  >  This e-mail message is intended only for the addressee(s) and contains
>  >  information which may be confidential. If you are not the intended recipient
>  >  please advise the sender by return email, do not use or disclose the
>  >  contents, and delete the message and any attachments from your system.
>  >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Encoded UTF16 json response

Posted by sebb <se...@gmail.com>.
On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
> 2009/3/5 sebb <se...@gmail.com>
>
>  > On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
>  > > 2009/3/5 sebb <se...@gmail.com>
>  > >
>  > >
>  > >  > On 02/03/2009, Troy Harris <tr...@gmail.com> wrote:
>  > >  > > Hi,
>  > >  > >
>  > >  > >  Im having trouble viewing a Response which is chunked UTF-16. View
>  > >  > results
>  > >  > >  tree displays encoded text which I cant use.
>  > >  >
>  > >  > I doubt that the chunking makes any difference.
>  > >  >
>  > >  > JMeter uses Java HTML document to display the response. I don't know
>  > >  > if it can handle UTF-16.
>  > >  >
>  > >  > >  If I Save Response to a file it appears as
>  > >  > >  expected in notepad (notepad++ displays NUL after
>  > >  > >  each character).
>  > >  >
>  > >  > That's not proof that the contents are OK - do you not have an
>  > >  > application that can display the data properly?
>  > >  >
>  > >
>  > >
>  > > Yes, the browser - FF/IE7. Once this page hits the browser the jqGrid
>  > loads
>  > >  with data.
>  > >
>  >
>  > So does it display correctly if the browser uses the copy downloaded
>  > using "Save Response to a file"?
>  >
>
>
> The downloaded copy saves as "response.json" which the jqGrid AJAX uses to
>  generate
>  the grid.
>
>
>  >
>  > You may need to save the HTML page and edit it to retrieve the data
>  > locally.
>  >
>
>
> Not a lot of time to attempt this at the moment. But next allocated round I
>  could
>  give it a try.

No point, given that the local file is processed OK. I assumed that it
might be necessary to tweak the HTML to do so but it seems not.

>
>  >
>  > This would show if the data is downloaded OK, i.e. the problem is
>  > purely that the Tree View Listener cannot handle UTF-16.
>  >
>  > By the way, which Response Data pane option were you using?
>  >
>  > Show Text/Render HTML/Render XML/Render JSON ?
>  >
>  > Do some work and not others?
>  >
>
> > They all display the same content except for Render XML.
>
>  The reponse displayed via View Results tree
>  http://img15.imageshack.us/img15/6953/jmeterutf16response.jpg
>

I see - not very useful...

Would you be able to send me (privately) one of the json files?

>
>  >
>  > >
>  > >  > >  Am I missing a config option to allow the UTF-16 reponse to be
>  > >  > displayed?
>  > >  >
>  > >  > No.
>  > >  >
>  > >  > >  Should I be able to extract a variable out of the saved file even
>  > though
>  > >  > its
>  > >  > >  UTF-16?
>  > >  >
>  > >  > No, you cannot extract variables out of saved files - UTF-16 or
>  > otherwise.
>  > >  >
>  > >  > However, you should be able to extract variables out of the response
>  > data.
>  > >  >
>  > >  > >
>  > >  > >  Response headers:
>  > >  > >  HTTP/1.1 200 OK
>  > >  > >  Cache-Control: private
>  > >  > >  Transfer-Encoding: chunked
>  > >  > >  Content-Type: application/json; charset=utf-16
>  > >  > >  Server: Microsoft-IIS/7.0
>  > >  > >  X-AspNet-Version: 2.0.50727
>  > >  > >  Set-Cookie:
>  > >  > >
>  > >  >
>  >  SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
>  > >  > >  expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
>  > >  > >  X-Powered-By: ASP.NET
>  > >  > >  Date: Mon, 02 Mar 2009 05:35:05 GMT
>  > >  > >
>  > >  > >
>  > >  > >
>  > >  > >  Thanks for your help.
>  > >  >
>  > >  > Is there a publically accessible page that returns data encoded in
>  > this
>  > >  > way?
>  > >  >
>  > >
>  > >
>  > > Not at the moment, software is in development stage.
>  > >
>  > >
>  > >  >
>  > >  > Does JMeter work OK for you if the encoding is set to UTF-8 (assuming
>  > >  > that there are such pages on the server under test)?
>  > >  >
>  > >
>  > >
>  > > I have the Developers changing the reponse to UTF-8 in the next build so
>  > >  hopefully
>  > >  the issue wont occur. I'll update the post then.
>  >
>  > OK, unless the pages really need UTF-16 it is probably better to use
>  > UTF-8 as the pages will usually be somewhat smaller.
>  >
>  > >  Thanks for your help Seb
>  > >
>  > >
>  > >
>  > >  >
>  > >  > >  Troy
>  > >  > >
>  > >  > >
>  > >  > >  --
>  > >  > >  NOTICE:
>  > >  > >  This e-mail message is intended only for the addressee(s) and
>  > contains
>  > >  > >  information which may be confidential. If you are not the intended
>  > >  > recipient
>  > >  > >  please advise the sender by return email, do not use or disclose
>  > the
>  > >  > >  contents, and delete the message and any attachments from your
>  > system.
>  > >  > >
>  > >  >
>  > >
>  > > > ---------------------------------------------------------------------
>  > >  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > >  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  > >  >
>  > >  >
>  > >
>  > >
>  > >
>  > >  --
>  > >
>  > > NOTICE:
>  > >  This e-mail message is intended only for the addressee(s) and contains
>  > >  information which may be confidential. If you are not the intended
>  > recipient
>  > >  please advise the sender by return email, do not use or disclose the
>  > >  contents, and delete the message and any attachments from your system.
>  > >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>
>
>  --
>  NOTICE:
>  This e-mail message is intended only for the addressee(s) and contains
>  information which may be confidential. If you are not the intended recipient
>  please advise the sender by return email, do not use or disclose the
>  contents, and delete the message and any attachments from your system.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Encoded UTF16 json response

Posted by Troy Harris <tr...@gmail.com>.
2009/3/5 sebb <se...@gmail.com>

> On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
> > 2009/3/5 sebb <se...@gmail.com>
> >
> >
> >  > On 02/03/2009, Troy Harris <tr...@gmail.com> wrote:
> >  > > Hi,
> >  > >
> >  > >  Im having trouble viewing a Response which is chunked UTF-16. View
> >  > results
> >  > >  tree displays encoded text which I cant use.
> >  >
> >  > I doubt that the chunking makes any difference.
> >  >
> >  > JMeter uses Java HTML document to display the response. I don't know
> >  > if it can handle UTF-16.
> >  >
> >  > >  If I Save Response to a file it appears as
> >  > >  expected in notepad (notepad++ displays NUL after
> >  > >  each character).
> >  >
> >  > That's not proof that the contents are OK - do you not have an
> >  > application that can display the data properly?
> >  >
> >
> >
> > Yes, the browser - FF/IE7. Once this page hits the browser the jqGrid
> loads
> >  with data.
> >
>
> So does it display correctly if the browser uses the copy downloaded
> using "Save Response to a file"?
>

The downloaded copy saves as "response.json" which the jqGrid AJAX uses to
generate
the grid.

>
> You may need to save the HTML page and edit it to retrieve the data
> locally.
>

Not a lot of time to attempt this at the moment. But next allocated round I
could
give it a try.


>
> This would show if the data is downloaded OK, i.e. the problem is
> purely that the Tree View Listener cannot handle UTF-16.
>
> By the way, which Response Data pane option were you using?
>
> Show Text/Render HTML/Render XML/Render JSON ?
>
> Do some work and not others?
>
> They all display the same content except for Render XML.

The reponse displayed via View Results tree
http://img15.imageshack.us/img15/6953/jmeterutf16response.jpg


>
> >
> >  > >  Am I missing a config option to allow the UTF-16 reponse to be
> >  > displayed?
> >  >
> >  > No.
> >  >
> >  > >  Should I be able to extract a variable out of the saved file even
> though
> >  > its
> >  > >  UTF-16?
> >  >
> >  > No, you cannot extract variables out of saved files - UTF-16 or
> otherwise.
> >  >
> >  > However, you should be able to extract variables out of the response
> data.
> >  >
> >  > >
> >  > >  Response headers:
> >  > >  HTTP/1.1 200 OK
> >  > >  Cache-Control: private
> >  > >  Transfer-Encoding: chunked
> >  > >  Content-Type: application/json; charset=utf-16
> >  > >  Server: Microsoft-IIS/7.0
> >  > >  X-AspNet-Version: 2.0.50727
> >  > >  Set-Cookie:
> >  > >
> >  >
>  SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
> >  > >  expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
> >  > >  X-Powered-By: ASP.NET
> >  > >  Date: Mon, 02 Mar 2009 05:35:05 GMT
> >  > >
> >  > >
> >  > >
> >  > >  Thanks for your help.
> >  >
> >  > Is there a publically accessible page that returns data encoded in
> this
> >  > way?
> >  >
> >
> >
> > Not at the moment, software is in development stage.
> >
> >
> >  >
> >  > Does JMeter work OK for you if the encoding is set to UTF-8 (assuming
> >  > that there are such pages on the server under test)?
> >  >
> >
> >
> > I have the Developers changing the reponse to UTF-8 in the next build so
> >  hopefully
> >  the issue wont occur. I'll update the post then.
>
> OK, unless the pages really need UTF-16 it is probably better to use
> UTF-8 as the pages will usually be somewhat smaller.
>
> >  Thanks for your help Seb
> >
> >
> >
> >  >
> >  > >  Troy
> >  > >
> >  > >
> >  > >  --
> >  > >  NOTICE:
> >  > >  This e-mail message is intended only for the addressee(s) and
> contains
> >  > >  information which may be confidential. If you are not the intended
> >  > recipient
> >  > >  please advise the sender by return email, do not use or disclose
> the
> >  > >  contents, and delete the message and any attachments from your
> system.
> >  > >
> >  >
> >
> > > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >  >
> >  >
> >
> >
> >
> >  --
> >
> > NOTICE:
> >  This e-mail message is intended only for the addressee(s) and contains
> >  information which may be confidential. If you are not the intended
> recipient
> >  please advise the sender by return email, do not use or disclose the
> >  contents, and delete the message and any attachments from your system.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


-- 
NOTICE:
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential. If you are not the intended recipient
please advise the sender by return email, do not use or disclose the
contents, and delete the message and any attachments from your system.

Re: Encoded UTF16 json response

Posted by sebb <se...@gmail.com>.
On 05/03/2009, Troy Harris <tr...@gmail.com> wrote:
> 2009/3/5 sebb <se...@gmail.com>
>
>
>  > On 02/03/2009, Troy Harris <tr...@gmail.com> wrote:
>  > > Hi,
>  > >
>  > >  Im having trouble viewing a Response which is chunked UTF-16. View
>  > results
>  > >  tree displays encoded text which I cant use.
>  >
>  > I doubt that the chunking makes any difference.
>  >
>  > JMeter uses Java HTML document to display the response. I don't know
>  > if it can handle UTF-16.
>  >
>  > >  If I Save Response to a file it appears as
>  > >  expected in notepad (notepad++ displays NUL after
>  > >  each character).
>  >
>  > That's not proof that the contents are OK - do you not have an
>  > application that can display the data properly?
>  >
>
>
> Yes, the browser - FF/IE7. Once this page hits the browser the jqGrid loads
>  with data.
>

So does it display correctly if the browser uses the copy downloaded
using "Save Response to a file"?

You may need to save the HTML page and edit it to retrieve the data locally.

This would show if the data is downloaded OK, i.e. the problem is
purely that the Tree View Listener cannot handle UTF-16.

By the way, which Response Data pane option were you using?

Show Text/Render HTML/Render XML/Render JSON ?

Do some work and not others?


>
>  > >  Am I missing a config option to allow the UTF-16 reponse to be
>  > displayed?
>  >
>  > No.
>  >
>  > >  Should I be able to extract a variable out of the saved file even though
>  > its
>  > >  UTF-16?
>  >
>  > No, you cannot extract variables out of saved files - UTF-16 or otherwise.
>  >
>  > However, you should be able to extract variables out of the response data.
>  >
>  > >
>  > >  Response headers:
>  > >  HTTP/1.1 200 OK
>  > >  Cache-Control: private
>  > >  Transfer-Encoding: chunked
>  > >  Content-Type: application/json; charset=utf-16
>  > >  Server: Microsoft-IIS/7.0
>  > >  X-AspNet-Version: 2.0.50727
>  > >  Set-Cookie:
>  > >
>  >  SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
>  > >  expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
>  > >  X-Powered-By: ASP.NET
>  > >  Date: Mon, 02 Mar 2009 05:35:05 GMT
>  > >
>  > >
>  > >
>  > >  Thanks for your help.
>  >
>  > Is there a publically accessible page that returns data encoded in this
>  > way?
>  >
>
>
> Not at the moment, software is in development stage.
>
>
>  >
>  > Does JMeter work OK for you if the encoding is set to UTF-8 (assuming
>  > that there are such pages on the server under test)?
>  >
>
>
> I have the Developers changing the reponse to UTF-8 in the next build so
>  hopefully
>  the issue wont occur. I'll update the post then.

OK, unless the pages really need UTF-16 it is probably better to use
UTF-8 as the pages will usually be somewhat smaller.

>  Thanks for your help Seb
>
>
>
>  >
>  > >  Troy
>  > >
>  > >
>  > >  --
>  > >  NOTICE:
>  > >  This e-mail message is intended only for the addressee(s) and contains
>  > >  information which may be confidential. If you are not the intended
>  > recipient
>  > >  please advise the sender by return email, do not use or disclose the
>  > >  contents, and delete the message and any attachments from your system.
>  > >
>  >
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>
>
>
>  --
>
> NOTICE:
>  This e-mail message is intended only for the addressee(s) and contains
>  information which may be confidential. If you are not the intended recipient
>  please advise the sender by return email, do not use or disclose the
>  contents, and delete the message and any attachments from your system.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Encoded UTF16 json response

Posted by Troy Harris <tr...@gmail.com>.
2009/3/5 sebb <se...@gmail.com>

> On 02/03/2009, Troy Harris <tr...@gmail.com> wrote:
> > Hi,
> >
> >  Im having trouble viewing a Response which is chunked UTF-16. View
> results
> >  tree displays encoded text which I cant use.
>
> I doubt that the chunking makes any difference.
>
> JMeter uses Java HTML document to display the response. I don't know
> if it can handle UTF-16.
>
> >  If I Save Response to a file it appears as
> >  expected in notepad (notepad++ displays NUL after
> >  each character).
>
> That's not proof that the contents are OK - do you not have an
> application that can display the data properly?
>

Yes, the browser - FF/IE7. Once this page hits the browser the jqGrid loads
with data.


> >  Am I missing a config option to allow the UTF-16 reponse to be
> displayed?
>
> No.
>
> >  Should I be able to extract a variable out of the saved file even though
> its
> >  UTF-16?
>
> No, you cannot extract variables out of saved files - UTF-16 or otherwise.
>
> However, you should be able to extract variables out of the response data.
>
> >
> >  Response headers:
> >  HTTP/1.1 200 OK
> >  Cache-Control: private
> >  Transfer-Encoding: chunked
> >  Content-Type: application/json; charset=utf-16
> >  Server: Microsoft-IIS/7.0
> >  X-AspNet-Version: 2.0.50727
> >  Set-Cookie:
> >
>  SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
> >  expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
> >  X-Powered-By: ASP.NET
> >  Date: Mon, 02 Mar 2009 05:35:05 GMT
> >
> >
> >
> >  Thanks for your help.
>
> Is there a publically accessible page that returns data encoded in this
> way?
>

Not at the moment, software is in development stage.

>
> Does JMeter work OK for you if the encoding is set to UTF-8 (assuming
> that there are such pages on the server under test)?
>

I have the Developers changing the reponse to UTF-8 in the next build so
hopefully
the issue wont occur. I'll update the post then.

Thanks for your help Seb


>
> >  Troy
> >
> >
> >  --
> >  NOTICE:
> >  This e-mail message is intended only for the addressee(s) and contains
> >  information which may be confidential. If you are not the intended
> recipient
> >  please advise the sender by return email, do not use or disclose the
> >  contents, and delete the message and any attachments from your system.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


-- 
NOTICE:
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential. If you are not the intended recipient
please advise the sender by return email, do not use or disclose the
contents, and delete the message and any attachments from your system.

Re: Encoded UTF16 json response

Posted by sebb <se...@gmail.com>.
On 02/03/2009, Troy Harris <tr...@gmail.com> wrote:
> Hi,
>
>  Im having trouble viewing a Response which is chunked UTF-16. View results
>  tree displays encoded text which I cant use.

I doubt that the chunking makes any difference.

JMeter uses Java HTML document to display the response. I don't know
if it can handle UTF-16.

>  If I Save Response to a file it appears as
>  expected in notepad (notepad++ displays NUL after
>  each character).

That's not proof that the contents are OK - do you not have an
application that can display the data properly?

>  Am I missing a config option to allow the UTF-16 reponse to be displayed?

No.

>  Should I be able to extract a variable out of the saved file even though its
>  UTF-16?

No, you cannot extract variables out of saved files - UTF-16 or otherwise.

However, you should be able to extract variables out of the response data.

>
>  Response headers:
>  HTTP/1.1 200 OK
>  Cache-Control: private
>  Transfer-Encoding: chunked
>  Content-Type: application/json; charset=utf-16
>  Server: Microsoft-IIS/7.0
>  X-AspNet-Version: 2.0.50727
>  Set-Cookie:
>  SecurityToken=etlwabVmCrGZDZU0Ix+Re1oUhBmHlZFQDDKrVO68Pd5tdqT2HgkEEyaiBR2UyKiL;
>  expires=Mon, 02-Mar-2009 05:55:06 GMT; path=/
>  X-Powered-By: ASP.NET
>  Date: Mon, 02 Mar 2009 05:35:05 GMT
>
>
>
>  Thanks for your help.

Is there a publically accessible page that returns data encoded in this way?

Does JMeter work OK for you if the encoding is set to UTF-8 (assuming
that there are such pages on the server under test)?

>  Troy
>
>
>  --
>  NOTICE:
>  This e-mail message is intended only for the addressee(s) and contains
>  information which may be confidential. If you are not the intended recipient
>  please advise the sender by return email, do not use or disclose the
>  contents, and delete the message and any attachments from your system.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Header in CSV File

Posted by Jan Lagerpusch <ja...@edict.de>.
Hi all,

is it possible to use a CSV data file with header information, using the
header column names as variables? 
Currently, the only way this works for me is if I delete the header row from
the CSV file and specify the column names in the CSV DataSet Config. I can
then access the field values using the ${specified_column_name} notation. 

However, when I include specified_column_name as the column header in the
CSV file's first row and leave the "Variable Names (comma-delimited)"
Parameter in CSV DataSet Config empty, the variable name is not replaced by
the column contents. Do I have to use a different parameter name in that
case?

Is it possible to have a header row in the CSV file after all?

Best regards & thanks in advance,
Jan 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


AW: Header in CSV File

Posted by Jan Lagerpusch <ja...@edict.de>.
Hi Pramod,

thank you for the information - this can be very useful in some cases!

Best regards,
Jan

-----Ursprüngliche Nachricht-----
Von: Nair, Pramod [mailto:pramod.nair@bankofamerica.com] 
Gesendet: Dienstag, 3. März 2009 07:19
An: JMeter Users List
Betreff: RE: Header in CSV File

Hi,

There is a work around to solve your problem temporarily.

This is what I do; I have an additional column named "Valid Data" which
takes the values Y/N

Before reading each row, I put the condition "${Valid Data}" == "Y" in
an If Controller. It skips if the Row contains anything other than Y,
and so it will skip the first Row as it will contain the value "Valid
Data"

Using this you can also control and process selective rows of your
datafile at runtime.


Thanks
Pramod
 
-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Tuesday, March 03, 2009 4:30 AM
To: JMeter Users List; jan.lagerpusch@edict.de
Subject: Re: Header in CSV File

On 02/03/2009, Jan Lagerpusch <ja...@edict.de> wrote:
> Hi all,
>
>  is it possible to use a CSV data file with header information, using
the
>  header column names as variables?
>  Currently, the only way this works for me is if I delete the header
row from
>  the CSV file and specify the column names in the CSV DataSet Config.
I can
>  then access the field values using the ${specified_column_name}
notation.
>
>  However, when I include specified_column_name as the column header in
the
>  CSV file's first row and leave the "Variable Names (comma-delimited)"
>  Parameter in CSV DataSet Config empty, the variable name is not
replaced by
>  the column contents. Do I have to use a different parameter name in
that
>  case?
>
>  Is it possible to have a header row in the CSV file after all?

No, the only way to specify the column names is using the GUI field.

Feel free to raise a Bugzilla enhancement request to allow the
variable names to be defined in the file header and/or to ignore the
file header.

>  Best regards & thanks in advance,
>  Jan
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org



The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, any review,
dissemination, distribution or duplication of this communication is strictly
prohibited. If you received this email in error, please contact the sender
immediately by reply e-mail and destroy all copies of the original message.
This email is not intended as an offer or solicitation for the purchase or
sale of any financial instruments.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Header in CSV File

Posted by "Nair, Pramod" <pr...@bankofamerica.com>.
Hi,

There is a work around to solve your problem temporarily.

This is what I do; I have an additional column named "Valid Data" which
takes the values Y/N

Before reading each row, I put the condition "${Valid Data}" == "Y" in
an If Controller. It skips if the Row contains anything other than Y,
and so it will skip the first Row as it will contain the value "Valid
Data"

Using this you can also control and process selective rows of your
datafile at runtime.


Thanks
Pramod
 
-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Tuesday, March 03, 2009 4:30 AM
To: JMeter Users List; jan.lagerpusch@edict.de
Subject: Re: Header in CSV File

On 02/03/2009, Jan Lagerpusch <ja...@edict.de> wrote:
> Hi all,
>
>  is it possible to use a CSV data file with header information, using
the
>  header column names as variables?
>  Currently, the only way this works for me is if I delete the header
row from
>  the CSV file and specify the column names in the CSV DataSet Config.
I can
>  then access the field values using the ${specified_column_name}
notation.
>
>  However, when I include specified_column_name as the column header in
the
>  CSV file's first row and leave the "Variable Names (comma-delimited)"
>  Parameter in CSV DataSet Config empty, the variable name is not
replaced by
>  the column contents. Do I have to use a different parameter name in
that
>  case?
>
>  Is it possible to have a header row in the CSV file after all?

No, the only way to specify the column names is using the GUI field.

Feel free to raise a Bugzilla enhancement request to allow the
variable names to be defined in the file header and/or to ignore the
file header.

>  Best regards & thanks in advance,
>  Jan
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org



The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you received this email in error, please contact the sender immediately by reply e-mail and destroy all copies of the original message. This email is not intended as an offer or solicitation for the purchase or sale of any financial instruments.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Header in CSV File

Posted by sebb <se...@gmail.com>.
On 02/03/2009, Jan Lagerpusch <ja...@edict.de> wrote:
> Hi all,
>
>  is it possible to use a CSV data file with header information, using the
>  header column names as variables?
>  Currently, the only way this works for me is if I delete the header row from
>  the CSV file and specify the column names in the CSV DataSet Config. I can
>  then access the field values using the ${specified_column_name} notation.
>
>  However, when I include specified_column_name as the column header in the
>  CSV file's first row and leave the "Variable Names (comma-delimited)"
>  Parameter in CSV DataSet Config empty, the variable name is not replaced by
>  the column contents. Do I have to use a different parameter name in that
>  case?
>
>  Is it possible to have a header row in the CSV file after all?

No, the only way to specify the column names is using the GUI field.

Feel free to raise a Bugzilla enhancement request to allow the
variable names to be defined in the file header and/or to ignore the
file header.

>  Best regards & thanks in advance,
>  Jan
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org