abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: svn commit: r599062 - /incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestTemplate.java
Date Wed, 28 Nov 2007 17:43:10 GMT
Three cheers for windows! :-)

jmsnell@apache.org wrote:
> Author: jmsnell
> Date: Wed Nov 28 08:58:27 2007
> New Revision: 599062
>
> URL: http://svn.apache.org/viewvc?rev=599062&view=rev
> Log:
> Fix test failure on systems that are not able to properly process the non-ascii characters
>
> Modified:
>     incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestTemplate.java
>
> Modified: incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestTemplate.java
> URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestTemplate.java?rev=599062&r1=599061&r2=599062&view=diff
> ==============================================================================
> --- incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestTemplate.java
(original)
> +++ incubator/abdera/java/trunk/dependencies/i18n/src/test/java/org/apache/abdera/i18n/test/iri/TestTemplate.java
Wed Nov 28 08:58:27 2007
> @@ -144,7 +144,7 @@
>      String t = "http://www.google.com/search?q={term}";
>      String e = "http://www.google.com/search?q=%C3%8E%C3%B1%C5%A3%C3%A9r%C3%B1%C3%A5%C5%A3%C3%AE%C3%B6%C3%B1%C3%A5%C4%BC%C3%AE%C5%BE%C3%A5%C5%A3%C3%AE%C3%B6%C3%B1";
>      HashMapContext c = new HashMapContext();
> -    c.put("term",new String("Îñţérñåţîöñåļîžåţîöñ".getBytes("UTF-8"),"UTF-8"));
 // not all java impl's are capable of handling this properly, so we have to force the conversion
to UTF-8
> +    c.put("term","\u00ce\u00f1\u0163\u00e9\u0072\u00f1\u00e5\u0163\u00ee\u00f6\u00f1\u00e5\u013c\u00ee\u017e\u00e5\u0163\u00ee\u00f6\u00f1");
>      eval(t,e,c);
>    }
>    
> @@ -169,10 +169,10 @@
>  
>    public static void test16() throws Exception {
>      String t = "http://www.google.com/search?q={term}";
> -    String e = "http://www.google.com/search?q=Îñţérñåţîöñåļîžåţîöñ";
> +    String e = "http://www.google.com/search?q=\u00ce\u00f1\u0163\u00e9\u0072\u00f1\u00e5\u0163\u00ee\u00f6\u00f1\u00e5\u013c\u00ee\u017e\u00e5\u0163\u00ee\u00f6\u00f1";
>      HashMapContext c = new HashMapContext();
>      c.setIri(true);
> -    c.put("term",new String("Îñţérñåţîöñåļîžåţîöñ".getBytes("UTF-8"),"UTF-8"));
 // not all java impl's are capable of handling this properly, so we have to force the conversion
to UTF-8
> +    c.put("term","\u00ce\u00f1\u0163\u00e9\u0072\u00f1\u00e5\u0163\u00ee\u00f6\u00f1\u00e5\u013c\u00ee\u017e\u00e5\u0163\u00ee\u00f6\u00f1");
>      eval(t,e,c);  // use the IriEvaluator so that pct-encoding is done correctly for
IRI's
>    }
>    
>
>
>   


-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog


Mime
View raw message