You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alexey Romanchuk <ui...@gorodok.net> on 2005/03/08 05:30:02 UTC

Re[2]: valid field localized displayName prolem

Hello!

KT> This is a feature of the MarkupWriter in Tapestry (as of 3.0). It
KT> treats characters other than the "normal" ones (a-z, 0-9 and etc)
KT> as unsafe and escape them as unicode. This has nothing to do with
KT> your template encoding.

may  be  i  can  override  it? where place of MarkupWriter factory? in
Engine?

KT> But why it makes it impossible to test your app? When you check
KT> the text in Java, it is just characters.

jwebunit  dont  recognize it. and there is 5 characters instead one. i
think it is no good..;)

same situation with FieldLabel and Delegator.

                       Alexey Romanchuk


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


Re: Re[2]: valid field localized displayName prolem

Posted by Kent Tong <ke...@cpttm.org.mo>.
Alexey Romanchuk <uinz <at> gorodok.net> writes:

> may  be  i  can  override  it? where place of MarkupWriter factory? in
> Engine?

Just override the getMarkupWriter() method in your page. But
then you need to copy the original MarkupWriter class to
create your own. However, please do *NOT* do this as it is
unrelated to your problem!

> jwebunit  dont  recognize it. and there is 5 characters instead one. i
> think it is no good..;)

I just tried using jwebunit to test a page with Chinese:

<select name="locale">
<option value="0">English</option>
<option value="1">&#20013;&#25991; (&#21488;&#28771;)</option>
</select> 

The Chinese is escaped, but it works just fine because the
HTML parser should turn them back into unicode characters.
So, your problem must reside somewhere else.

FYI, here is my test case:

public class JWebUnitTestCase extends WebTestCase {
	public JWebUnitTestCase(String name) {
		super(name);
	}
	protected void setUp() throws Exception {
		getTestContext().setBaseUrl(
			"http://localhost:8080/OnlineForum");
	}
	public void testUnicode() {
		beginAt("/app");
		assertOptionsEqual("locale", new String[] {"English", "中文 (台灣)"});
	}
}



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