Re: changing encoding for helma.File
"Hannes Wallnoefer" <[email protected]> Tue, 8 Jan 2008 11:51:00 +0100
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Anton, 2008/1/8, Anton Pirker <[email protected]>: > Hello List! > > I am reading textfiles with readln() from helma.File(). > The Problem is, that the textfiles are in utf8. I tried to change the > encoding in app.properties with > charset = UTF-8 (and charset = UTF8, i am never sure wich one it is) Both should work. Java has canonical names and aliases for encodings. I can't find a list of aliases anymore, and freakingly the canonical names are different depending on which java package you are using: http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html > But no mather what i tried, the words look like scrambled eggs. > In helma.File() i found out, that javas FileReader() is used to read the > file, which uses the default encoding. There is no chance to change the > encoding. > > How can i read utf8-files? IMO the helma.File constructor should take a second optional parameter for the encoding. As I said before, helma.File really needs some polish. I think we should tackle this for helma 1.7. hannes