Hi,
I don't really know which list to post this on, since I'm having difficulties with Seaside and Squeak concerning string encoding. I think that I may have a possible solution but desperatly need some help on string encoding/converting issues. Can anybody point me toward a good site / document / book that explains how Squeak (3.10.2) handles ByteStrings / WideStrings and how to convert them to and from UTF-8?
Many regards,
Ole Voß.
Uhm, ok, I get it ;-)
I'll rephrase that... how do I ensure that a UTF-8 textfile will be read and recognised as such using Squeak (or Pharo) smalltalk? I was expecting some sort of decoding mechanisms or a method of telling Squeak this String or Stream is now utf-8.
A hint? Anybody? Please? Pretty Please?
Ole.
On Jan 19, 2010, at 10:22 PM, Ole Voß wrote:
Hi,
I don't really know which list to post this on, since I'm having difficulties with Seaside and Squeak concerning string encoding. I think that I may have a possible solution but desperatly need some help on string encoding/converting issues. Can anybody point me toward a good site / document / book that explains how Squeak (3.10.2) handles ByteStrings / WideStrings and how to convert them to and from UTF-8?
Many regards,
Ole Voß._______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
On 21.01.2010, at 18:08, Ole Voß wrote:
Uhm, ok, I get it ;-)
I'll rephrase that... how do I ensure that a UTF-8 textfile will be read and recognised as such using Squeak (or Pharo) smalltalk? I was expecting some sort of decoding mechanisms or a method of telling Squeak this String or Stream is now utf-8.
A hint? Anybody? Please? Pretty Please?
aStream converter: UTF8TextConverter new.
(which in Squeak is the default nowadays, just inspect a new file stream ...)
- Bert -
On Jan 21, 2010, at 7:12 PM, Bert Freudenberg wrote:
On 21.01.2010, at 18:08, Ole Voß wrote:
Uhm, ok, I get it ;-)
I'll rephrase that... how do I ensure that a UTF-8 textfile will be read and recognised as such using Squeak (or Pharo) smalltalk? I was expecting some sort of decoding mechanisms or a method of telling Squeak this String or Stream is now utf-8.
A hint? Anybody? Please? Pretty Please?
aStream converter: UTF8TextConverter new.
(which in Squeak is the default nowadays, just inspect a new file stream ...)
- Bert -
Thank you Bert! Although the above didn't work as such, it set me on the right track!
This solution worked for me: stream := MultiByteFileStream readOnlyFileNamed: commentfilepath.
I'm fairly new to smalltalk, so thank you for bearing with me :-)
Ole.
beginners@lists.squeakfoundation.org