[Pharo-users] Artefact and WideString
Sven Van Caekenberghe
sven at stfx.eu
Thu Oct 22 10:16:29 EDT 2015
> On 22 Oct 2015, at 16:00, Stephan Eggermont <stephan at stack.nl> wrote:
> On 22/10/15 12:01, Sven Van Caekenberghe wrote:
>>> On 22 Oct 2015, at 11:14, Hilaire <hilaire at drgeo.eu> wrote:
>>> Le 21/10/2015 22:26, olivier auverlot a écrit :
>>>> Hi Hilaire,
>>>> Take a look in the Artefact demos. I think there are a PDF document
>>>> with a monetary character.
>>> Indeed ((128 asCharacter) asString).
>> I am pretty sure this is wrong. The Unicode code point for the Euro symbol is decimal 8364 and not 128.
> Yes, it might be ISO-Latin-1. There are several codepages having € at 128. PDF support several encodings, I don't know what Artefact uses by default.
Indeed, I spoke too quickly, several indeed do (44 out of 69 defined):
ZnByteEncoder knownEncodingIdentifiers select: [ :each |
(ZnByteEncoder newForEncoding: each) characterDomain includes: $€ ].
collect: [ :each | ZnByteEncoder newForEncoding: each ])
select: [ :each | each characterDomain includes: $€ ]
thenCollect: [ :each | each identifier -> (each encodeString: $€ asString) ].
Most but not all use 128 as encoding. But Latin1 is not one of them (at least not in the strict interpretation).
ZnCharacterEncoder latin1 encodeString: $€ asString.
More information about the Pharo-users