On 19.07.2010 07:12, Miguel Enrique Cobá Martínez wrote: > ... > 2. This text be correctly send to a modern web browser and rendered in > utf-8 encoding correctly.
In Seaside 2.8 - use WAKomEncoded - configure the application to use utf-8 - do _not_ send #convertToEncoding: In Seaside 3.0 rc - set the encoding on the server to utf-8 - do _not_ send #convertToEncoding: If that doesn't work please post on the Seaside mailing list with: - the exact Pharo image version you have - the exact Seaside version you have - the exact Kom version you have - does the String display correctly in inspector? - the output of (yourString convertToEncoding: 'utf-8') asByteArray > 3. Upload a java messages bundle (or a file with characters outside > ASCII) with a web browser posted to a Seaside application, stored > temporaly in disk on the server and processed correctly (by opening it > with some FileStream class) inside the image. Java message bundles: saving: - open a file stream in binary mode - save contents of the upload to the stream reading: - open a file stream in text mode and iso-8859-1 as the encoding. This will only work for Latin-1 character's but Java message bundles support Unicode. You need to manually process Unicode escapes [1]. other files with characters outside ASCII: saving: - open a file stream in binary mode - save contents of the upload to the stream reading: - Open a file stream in text mode and the correct encoding on the file. Knowing the right encoding is hard to impossible. Seaside doesn't know it because the browser doesn't tell Seaside. The browser doesn't know it because the operating system doesn't know either. [1] http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.3 Cheers Philippe _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
