• marc123

rss with french charachters??

Hi,

I recently used the

com.myjavatools.xml.Rss
com.myjavatools.xml.Rss.Item

libraries to parse rss,
however it seems that special charachters such as à é are bieng converted to unicode charachter /ufffd

so when i print out the string finally you get stuff like:


La lumiére se met au service de la sécurité
which is printed out as
La lumi?re se met au service de la s?curit?


i used the following rss channel as a test:
http://www.zdnet.fr/feeds/rss/techupdate/
but other french rss channels exhibit the same issue...


Is this an issue in the library, or am i setting my encoding wrong somewhere??

Thanks,
Marc
(marcorbiscommunications.com)

update: foundation classes for Java 5

Version 5.0 of myjavatools library is being posted to the site.

A new package, foundations, was added. Strings class tends to be usable with collections and varargs; chars is a convenient method to scan through characters:

CharSequence cs = "abcd".subsequence(2,4);

for (char c : chars(cs)) {
  System.out.println(c);
}


Files has similar new methods:

for (char c : chars(new File("mytext.txt"))) {
  System.out.println(c);
}

for (byte b : bytes(new File("notepad.exe"))) {
  System.out.println(b);
}

for (String s : lines(new File("mytext.txt"))) {
  System.out.println(s);
}


Did I mention that Files.copy() method was rewritten to use memory-mapped files from nio library?
  • mtracey

posting a form

I have just started trying to use this tool. It looks good, but I can't quite achieve sucess. I am trying to automatically validate an xml document against its schema using this site:
http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx

I can get the basic form downloaded successfully.

I have deciphered the form and entered what I think are the correct parameters, _VIEWSTATE, the SchemaFile, the XmlFile, NamespaceUri as "" and "Validate","Submit".

However, after setting those parameters, post() returns an InputStream that only has the basic form, without the vaidating results I achieve when I actually use the form manually. Any thoughts how I can proceed to resolve this? I wasn't sure what to do about the form information : name="PageForm" id="PageForm" I tried omitting it and including it. No apparent difference.


Thanks.

projects/web... ServerHttpRequest update

This class that is indispensable in parsing multipart requests in a servlet or JSP, underwent a real-life test, and, hence, a robustness upgrade.

The problem was with weird (okay, buggy) Tomcat 5 reader in its connector. This new implementation does not use reader; instead it uses the original requests, byte-based ServletInputStream, and, to improve performance, uses its own adaptive size buffer. It still did not always work with the build of Tomcat 5 that is provided withing JBoss 3.2 distribution (at times it does, at times it does not) - but the one in JBoss 4 is perfectly okay, and you can just update your JBoss 3.2.

Let me know if you encounter problems with this.

See http://www.myjavatools.com/projects/v.1.4.2/web/mjweb.zip