You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2016/06/02 14:25:05 UTC

[Bug 59657] New: junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

            Bug ID: 59657
           Summary: junk character(Simplified Chinese) in BeanShell
                    Sampler's 'script' Textbox
           Product: JMeter
           Version: 3.0
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: hppyhjh@163.com

Created attachment 33909
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33909&action=edit
junk character(chinese) in beashell sampler

In Jmeter V2.13 and before, Simplified Chinese character was displayed
correctly in BeanShell Sampler. But was displayed junk characters in V3.0, btw,
still displayed correctly in 'View Result Tress's Request data.

Plz see the attachement pic and u will see.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #9 from Felix Schumacher <fe...@internetallee.de> ---
RSyntaxText chooses "consolas" as the default font for windows (when asked).
That font seems to have no support for the chinese characters. The default
monospaced font for java seems to have support for the chinese characters. So
if we don't set the font, it seems to work.

One can also put "Monospaced" as the desired font in jmeter.properties.

Linux had no problem, since it has no "consolas" font by default and therefore
"Monospaced" was chosen as replacement.

I have no Mac, so I don't know, if it had a problem.

Date: Thu Jun  9 16:33:45 2016
New Revision: 1747562

URL: http://svn.apache.org/viewvc?rev=1747562&view=rev
Log:
Only set font in JSyntaxTextArea, when property jsyntaxtextarea.font.family is
set.

Bugzilla Id: 59657

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/JSyntaxTextArea.java
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/properties_reference.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

harry_no_spot <hp...@163.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cs_awater@139.com

--- Comment #10 from harry_no_spot <hp...@163.com> ---
*** Bug 59827 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

--- Comment #8 from harry_no_spot <hp...@163.com> ---
Created attachment 33922
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33922&action=edit
monospaced font is listed as first

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

--- Comment #2 from Sebb <se...@apache.org> ---
(In reply to Felix Schumacher from comment #1)

> I believe, that http://svn.apache.org/viewvc?view=revision&revision=1731546
> is responsible for your problem (together with your OS and its choice of a
> default font).

In theory that should not have an effect unless the user overrides one of the
property defaults. If it does have an effect, then there may be something wrong
with the patch. One way to check this would be to skip the setFont() call if
the user has not provided any overrides.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

--- Comment #7 from harry_no_spot <hp...@163.com> ---
(In reply to Felix Schumacher from comment #6)
> Created attachment 33920 [details]
> Enhanced jmeter script to iterate over available chinese fonts
> 
> Could you test the newly added test script and see, if the font "Monospaced"
> is listed in the jmeter.log file afterwards?


Yes. "Monospaced" is listed as the first one. plz check the attached pic.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33911|0                           |1
        is obsolete|                            |

--- Comment #6 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 33920
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33920&action=edit
Enhanced jmeter script to iterate over available chinese fonts

Could you test the newly added test script and see, if the font "Monospaced" is
listed in the jmeter.log file afterwards?

It should look something like this:
2016/06/06 20:45:37 INFO  - jmeter.threads.JMeterThread: Thread started:
Thread-Gruppe 1-1.
2016/06/06 20:45:38 INFO  - jmeter.protocol.java.sampler.JSR223Sampler: 你好,世界!.
2016/06/06 20:45:38 INFO  - jmeter.protocol.java.sampler.JSR223Sampler:
java.awt.Font[family=Noto Sans CJK TC Light,name=Noto Sans CJK TC
Light,style=plain,size=1].
2016/06/06 20:45:38 INFO  - jmeter.protocol.java.sampler.JSR223Sampler:
java.awt.Font[family=Noto Sans Mono CJK SC Regular,name=Noto Sans Mono CJK SC
Regular,style=plain,size=1].
2016/06/06 20:45:38 INFO  - jmeter.protocol.java.sampler.JSR223Sampler:
java.awt.Font[family=Monospaced,name=Monospaced.bold,style=plain,size=1].
2016/06/06 20:45:38 INFO  - jmeter.protocol.java.sampler.JSR223Sampler:
java.awt.Font[family=Noto Sans CJK JP Light,name=Noto Sans CJK JP
Light,style=plain,size=1].
...

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

--- Comment #4 from harry_no_spot <hp...@163.com> ---
Created attachment 33918
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33918&action=edit
still junk chinese letters in a JSytaxTextArea

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 33911
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33911&action=edit
Simple test case with chinese letters in a JSytaxTextArea

The attached test case displays correctly with jmeter 3.0 under ubuntu 16.04.
Can you test this one on your computer?

I believe, that http://svn.apache.org/viewvc?view=revision&revision=1731546 is
responsible for your problem (together with your OS and its choice of a default
font).

You can try to set the jmeter property jsyntaxtextarea.font.family to a font
that contains the simplified chinese letters. The example in jmeter.properties
uses the font family "Hack".

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

--- Comment #3 from harry_no_spot <hp...@163.com> ---

> The attached test case displays correctly with jmeter 3.0 under ubuntu
> 16.04. Can you test this one on your computer?
> 
> I believe, that http://svn.apache.org/viewvc?view=revision&revision=1731546
> is responsible for your problem (together with your OS and its choice of a
> default font).
> 
> You can try to set the jmeter property jsyntaxtextarea.font.family to a font
> that contains the simplified chinese letters. The example in
> jmeter.properties uses the font family "Hack".

1. I directly opened the attached test case of yours. Still displayed junk
character.

2. I changed jmeter.properties of 1 line:
jsyntaxtextarea.font.family=宋体
then reopened the attached test case of yours. displayed OK.

plz see the 2 attachments.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59657] junk character(Simplified Chinese) in BeanShell Sampler's 'script' Textbox

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59657

--- Comment #5 from harry_no_spot <hp...@163.com> ---
Created attachment 33919
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33919&action=edit
correct chinese letters with jsyntaxtextarea.font.family property

-- 
You are receiving this mail because:
You are the assignee for the bug.