[GemStone-Smalltalk] Strange source import behaviour ..

Richard Sargent via GemStone-Smalltalk gemstone-smalltalk at lists.gemtalksystems.com
Sat Dec 19 08:13:14 PST 2015


Marten,

I am suspicious that this is a UTF-8 encoding issue. Use a binary editor
and see how the $- bytes are actually encoded in the file. 16r2D shouldn't
be encoded, but ....

If it is a UTF-8 encoded character, you would have the wrong character
(pasted from a word processor or other source?).


As an aside, if you do have UTF-8 encoded characters in a file-out, start
the file-in with the line FILEFORMAT UTF-8. (The default for Topaz is 8BIT.)

Richard




On Sat, Dec 19, 2015 at 6:52 AM, Marten Feldtmann via GemStone-Smalltalk <
gemstone-smalltalk at lists.gemtalksystems.com> wrote:

> Using my modelling tool I created the following source code (an extract).
> Please notice how the source code has changed within the database ($- is
> converted to hB) . The source code is imported via a topaz script:
>
> %
> category: 'framework-indices'
> set compile_env: 0
> method: ES3APIElection
> removeIndices
>
>     " Generator: 'Topaz/Gemstone (REST Server Smalltalk)' Version:
> '08.06.02-02.05.17' LastRun: '2015_12_19_10_24_04' "
>     " Model-Version: '1.1.115'  "
>
>
> %
> category: 'model-json-support'
> set compile_env: 0
> classmethod: ES3APIElection
> pumSimpleSwaggerModelNeoJsonMapping: mapping
>
>     " Generator: 'Topaz/Gemstone (REST Server Smalltalk)' Version:
> '08.06.02-02.05.17' LastRun: '2015_12_19_10_24_04' "
>     " Model-Version: '1.1.115'  "
>
>
>     mapping
>         mapProperty: #electionDate
>        * getter: [ :object | | value | ((value := object getElectionDate)
> ~= UndefinedObject and:[ value isNil not ]) ifTrue: [ value
> asStringUsingFormat: #(3 2 1 $-  1 1 ) ] ifFalse:[ nil ]]*
> *        setter: [ :object :value | value ifNotNil:[ object
> setElectionDate: (Date fromString: value usingFormat: #(3 2 1 $-  1 1 ))
> ]].*
>
>
> ... rest ist left out ...
>
>
> %
>
>
> the bold printed stuff is imported as:
>
>
> *    mapping*
> *        mapProperty: #electionDate*
> *        getter: [ :object | | value | ((value := object getElectionDate)
> ~= UndefinedObject and:[ value isNil not ]) ifTrue: [ value
> asStringUsingFormat: #(3 2 1 hB  1 1 ) ] ifFalse:[ nil ]]*
> *        setter: [ :object :value | value ifNotNil:[ object
> setElectionDate: (Date fromString: value usingFormat: #(3 2 1 hB  1 1 ))
> ]].*
>
> _______________________________________________
> GemStone-Smalltalk mailing list
> GemStone-Smalltalk at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/gemstone-smalltalk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/gemstone-smalltalk/attachments/20151219/0c7924e3/attachment.html>


More information about the GemStone-Smalltalk mailing list