Reading FlatFile

Has anyone experience with reading files using “getFile” buildInService?

Problem: If I try to read a file with content such letters “ä,ü,ö”, these letters are not readable for me. All other content ok.

Thoughts?

Thanks.

A few possibilities that I can think of:

  • font isn’t installed on your developer’s jvm (characterised by display of squares instead of the characters).
  • when you convert from bytes to string the default encoding is screwing up the characters… either they look like question marks (or was it upside down question marks… I can’t remember) Try playing around with different encodings.

A project I was involved with had problems with encodings of sjis (japanese) characters. The problem was a combination of the above two: firstly the developer was showing them as boxes (which means the font doesn’t have a character it can use. The other problem was when the encoding was wrong for bytes to string and vice versa it would show up as question marks.

Some other things you could do would be to write a java service that takes in a byte array and loops over it printing out the character’s integer, that’ll tell you whether it’s doing something strange as you can usually find a site that has character lists and see what’s going on.

regards,
Nathan Lee
[url=“http://www.customware.net/wmunit”]http://www.customware.net/wmunit[/url] WmUnit - Improve the quality of your webMethods services

Nathan,
Thanks for the input.

I tried to encode the flat file with encoding (buildIn: bytesToString) “ISO-8859-1”. It works perfect!

Thanks a lot.

regards,
Werner Bales