Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
UTF8TextConverter
Last updated at 11:04 am UTC on 4 October 2017
is a TextConverter

Class String implements
 squeakToUtf8
	"Convert the receiver into a UTF8-encoded string"
	
	^self convertToWithConverter: UTF8TextConverter new.

UTF8TextConverter and Latin1TextConverter examples

Squeak_UTF8TextConverterTest.png


There is also ByteString>>squeakToUtf8

 squeakToUtf8
	"Convert the given string (self) to UTF-8 from Squeak's internal representation."

	^UTF8TextConverter encodeByteString: self

See note on page ByteString about its use to temporarily store UTF8 data.