Hi Sven, thank you very much for your explanation. I will read the pharo book chapter again tomorrow morning. Each time I have to do with encoding, I have to start again with reading....;-(
I was not asking for the reason of encoding but because OSProcess command: needs a String and not a Byte Array. But yes, sure, first encode it and then convert it back to a string. Regards and a nice evening Sabine 2016-06-06 19:57 GMT+02:00 Sven Van Caekenberghe-2 [via Smalltalk] < ml-node+s1294792n4899446...@n4.nabble.com>: > > > On 06 Jun 2016, at 17:22, Sabine Manaa <[hidden email] > <http:///user/SendEmail.jtp?type=node&node=4899446&i=0>> wrote: > > > > why ByteArray? > > http://www.unicode.org/faq/utf_bom.html > > A Unicode transformation format (UTF) is an algorithmic mapping from every > Unicode code point (except surrogate code points) to a unique byte > sequence. > > https://en.wikipedia.org/wiki/UTF-8 > > UTF-8 encodes each of the 1,112,064 valid code points in the Unicode code > space (1,114,112 code points minus 2,048 surrogate code points) using one > to four 8-bit bytes (a group of 8 bits is known as an octet in the Unicode > Standard). > > In Pharo > > > https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Zinc-Encoding-Meta/Zinc-Encoding-Meta.html > > Of course, given a ByteArray, whose values are all between 0 and 255 by > definition, you can convert it to a ByteString. That String is not a > correct (Pharo) String anymore, it is like converting a PNG or JPEG to > String, you can do it, it is just wrong. > > When talking to the outside world, be it over a network connection, or via > primitive calls, anything but pure ASCII strings need an encoding. This has > to be agreed upon by both parties. If the receiving party wants UTF-8 > forced into a (kind of) String, that is (still) possible. > > Your initial solution seems to indicate that this is expected. This (ugly) > conversion should be done at an as low level as possible, IMHO. > > Sven > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://forum.world.st/OSProcess-command-with-german-umlaut-does-not-work-tp4899285p4899446.html > To start a new topic under Pharo Smalltalk Users, email > ml-node+s1294792n1310670...@n4.nabble.com > To unsubscribe from Pharo Smalltalk Users, click here > <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1310670&code=bWFuYWEuc2FiaW5lQGdtYWlsLmNvbXwxMzEwNjcwfC0xOTE3OTcxOTg5> > . > NAML > <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://forum.world.st/OSProcess-command-with-german-umlaut-does-not-work-tp4899285p4899454.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.