Hi!

I'm struggling with the TextConverter's API in Pharo :).

I wanted to test the converters in Pharo, and I found the method
#convertFromSystemString: that should (from its name) convert a Pharo
String into an encoded version of it.

(UTF8TextConverter default convertFromSystemString: 'á').

Funny thing, it does not do that. It does the opposite: it tries to convert
an encoded string to a pharo string. And so it fails. Of course, its
symmetrical version does what I want and behaves as the ZnUTF8Encoder :)

(UTF8TextConverter default convertToSystemString: 'á') asByteArray
 "#[195 161]"

ZnUTF8Encoder new encodeString: 'á' "#[195 161]"

Question:
- does the convertTo/From methods makes sense to you or It's just me that
sees them inverted?
- does it make sense to have the two versions of converters? Zn and the
TextConverters do the same in my opinion (or maybe I'm confused :) )

Guille

Reply via email to