Adding CP1251 support to ZnByteEncoder comes down to adding one method (and 
adapting some initialization code):

ZnByteEncoder class>>#cp1251Mapping
        "self generateByteToUnicodeSpec: 
''http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT''"

        ^ #(
        16r0402 16r0403 16r201A 16r0453 16r201E 16r2026 16r2020 16r2021 
        16r20AC 16r2030 16r0409 16r2039 16r040A 16r040C 16r040B 16r040F 
        16r0452 16r2018 16r2019 16r201C 16r201D 16r2022 16r2013 16r2014 
        nil 16r2122 16r0459 16r203A 16r045A 16r045C 16r045B 16r045F 
        16r00A0 16r040E 16r045E 16r0408 16r00A4 16r0490 16r00A6 16r00A7 
        16r0401 16r00A9 16r0404 16r00AB 16r00AC 16r00AD 16r00AE 16r0407 
        16r00B0 16r00B1 16r0406 16r0456 16r0491 16r00B5 16r00B6 16r00B7 
        16r0451 16r2116 16r0454 16r00BB 16r0458 16r0405 16r0455 16r0457 
        16r0410 16r0411 16r0412 16r0413 16r0414 16r0415 16r0416 16r0417 
        16r0418 16r0419 16r041A 16r041B 16r041C 16r041D 16r041E 16r041F 
        16r0420 16r0421 16r0422 16r0423 16r0424 16r0425 16r0426 16r0427 
        16r0428 16r0429 16r042A 16r042B 16r042C 16r042D 16r042E 16r042F 
        16r0430 16r0431 16r0432 16r0433 16r0434 16r0435 16r0436 16r0437 
        16r0438 16r0439 16r043A 16r043B 16r043C 16r043D 16r043E 16r043F 
        16r0440 16r0441 16r0442 16r0443 16r0444 16r0445 16r0446 16r0447 
        16r0448 16r0449 16r044A 16r044B 16r044C 16r044D 16r044E 16r044F )

All in all it is just a 128 slot Array constant. I will start another thread 
asking for which encodings people want to add.

On 12 Sep 2014, at 14:39, stepharo <[email protected]> wrote:

>> 
>> Thank you Damien for reposting my question here and for guiding me here.
>> 
>> Following the Stef's reccomendations, converter is now published as separate
>> package here: http://ss3.gemstone.com/ss/CP1251TextConverter.html
>> 
>> But I do not get an answer I'm seeking for yet.
>> 
>> I want/seeking the way for this converter to be included in standard Pharo
>> distribution. Smalltalk has small but consistent Russian community, so it'
>> looks reasonable, especially taking into account that we have
>> RussianEnvironment anyway.
> 
> Yuri we would prefer to have a strong package maintained outside of Pharo.
> Why because we are trying to reduce and remove code from Pharo.
> What we can do is to offer you an account to our automatic build server.
> Based on it you could load a configuration (ConfigurationOfRussianPharo) and 
> provide
> this image to the people requiring russian support.
> It would be good that you evaluate the solution proposed by Sven to avoid 
> duplication of effort.
>> Plus, I want to use this simple and small example to understand a process of
>> including my code in "mainstream" and get understand the possible problems.
> Here is the process for enhancement to Pharo
>    - signing the license agreement (see www.pharo.org)
>    - opening a bug or enhancement request on fogbugz
>    https://pharo.fogbugz.com
>    - proposing changes with tests that get reviewed by the community
> 
> For magritte and Glorp you should contact the package maintainer.
> Each project on SmalltalkHub has now a public inbox. So I would publish my 
> changes there
>> Working on SmallPOS I made a lot of adjusments in "Pharo Core", Magritte and
>> GLORP, which probably may be useful outside the SmallPOS. So I started a
>> process of separating this code from SmallPOS package and want to know how
>> to share it.
>> 
>> 
>>> Currently it does CP1250, CP1252 and CP1253 among others (including
>>> KOI8R), but not (yet) CP1251.
>> Sven, abstractly, it will be better to include CP1251. After all, it's
>> little bit strange to have KOI8R implemented without implementing CP1251.
>> Second one is widely used - much wider then KOI8R. I was forced to use it as
>> hardware I use (sticker label printer and cash register) was designed to use
>> CP1251 at hardware level. As far as it takes no or little efforts I propose
>> you to add the mentioned encoding.
> 
> Good. You see when we do not get confronted with a problem it is difficult to 
> react
> adequately :)
>> 
>> 
>>> Do you see http://www.squeaksource.com/RussianSupport.html
>> No, I dont. When I implemented mine one - it was several years ago - I tried
>> to find one, but failed. Repo you pointing me to was made far before mine,
>> so it was possible to find it. I don't know why I failed to find it. I may
>> assume that, probably, I found it but it is not working. You see, it looks
>> like it designed for Squeak, or, at least, the author do not follow the
>> template other ByteTextConverters follow. Just a speculation, I do not tried
>> to load it now.
>> 
> 
> This is why I suggest:
>    - publish on SmalltalkHub
>    - create a configuration with meta data.
>    - publish it to MetaRepoForPharo30
>    - your package will be available on
> https://ci.inria.fr/pharo-contribution/job/PharoProjectCatalog/HTML_Report/?
> 
>    soon we will have a public web site catalog.Pharo.org


Reply via email to