Hi Jon, Welcome to Pharo!
This seems to work for me: | cnString | cnString := '请收藏我们的网址'. cnString collect: [ :each | each charCode ] as: Array "Print It" #(35831 25910 34255 25105 20204 30340 32593 22336) I took the string from www.google.cn, I don't know what it means… Mind you, due to font limitations, it shows as question marks in the workspace. I guess this depends on the OS/VM. I did this example in Pharo 1.2.2 on Mac OS X 10.7 using Croquet Closure Cog VM [CoInterpreter VMMaker-oscog.47] Pharo Cog VM. HTH, Sven On 26 Jul 2011, at 06:23, Jon Hancock wrote: > I'm not sure what to expect with UTF-8 encoding in Pharo. Can someone point > me to some docs or past discussion? > > I have tried this today in pharo 1.3: > > 1 - in a workspace: cnString := ''. > 2 - Now I go to Firefox and copy 4 simplified Chinese characters and try > to paste this in between the quotes of the smalltalk string in the workspace. > 3 - the paste operation throws "Error: Invalid utf8 input detected" > > The web page I'm copying from is utf-8 encoded. I can copy text from this > page and paste into vim or gEdit just fine. > The error is thrown by UTF8TextConvertor>>errorMalformedInput > > I would provide a stack trace...but being new to pharo, I'm not sure how to > grab such a report without doing a screen capture. > > thanks, Jon > >
