stevedlawrence commented on a change in pull request #490: URL: https://github.com/apache/incubator-daffodil/pull/490#discussion_r574459908
########## File path: daffodil-io/src/main/scala/org/apache/daffodil/processors/charset/IBM1047.scala ########## @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.daffodil.processors.charset + +import org.apache.daffodil.io.InputSourceDataInputStream +import org.apache.daffodil.io.FormatInfo + +object BitsCharsetIBM1047 extends { + override val name = "IBM1047" + override val aliases = Seq("X-IBM-1047-S390") +} with BitsCharsetJava { + + val decodeStringTable = + "\u0000\u0001\u0002\u0003\u009C\u0009\u0086\u007F\u0097\u008D\u008E\u000B\u000C\u000D\u000E\u000F" + + "\u0010\u0011\u0012\u0013\u009D\u0085\u0008\u0087\u0018\u0019\u0092\u008F\u001C\u001D\u001E\u005E" + Review comment: According to https://www.compart.com/en/unicode/charsets/IBM1047, the ``\u005E`` at the end of this line is incorrect and should be ``\u001F``. I think everything else looks correct. ########## File path: daffodil-io/src/main/scala/org/apache/daffodil/processors/charset/DaffodilCharsetProvider.scala ########## @@ -51,7 +51,8 @@ object DaffodilCharsetProvider { BitsCharsetUTF16LE, BitsCharsetUTF32BE, BitsCharsetUTF32LE, - BitsCharsetUTF8) + BitsCharsetUTF8, + BitsCharsetIBM1047 ) Review comment: I would prefer that this be added to this list in alphabetical order so things are a bit more organized. So move this right after BitsCharsetIBM037 ########## File path: daffodil-io/src/main/scala/org/apache/daffodil/processors/charset/IBM1047.scala ########## @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.daffodil.processors.charset + +import org.apache.daffodil.io.InputSourceDataInputStream +import org.apache.daffodil.io.FormatInfo + +object BitsCharsetIBM1047 extends { + override val name = "IBM1047" + override val aliases = Seq("X-IBM-1047-S390") Review comment: Why the ``X-``? Can this just be ``IBM-1047-S390``? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
