[ 
https://issues.apache.org/jira/browse/DAFFODIL-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063364#comment-17063364
 ] 

Baumann Kurt edited comment on DAFFODIL-2293 at 3/20/20, 1:54 PM:
------------------------------------------------------------------

Hi Steve, Hi Mike,

The copy and adjustment of "ISO885918BitPacked.scala" file below (copy and 
adjusted from "USAASCII*BitPacked.scala").
{code:java}
/**
 * X-DFDL-ISO-88591-8-BIT-PACKED-LSB-FIRST occupies only 8 bits with each
 * code unit.
 */
object BitsCharsetISO885918BitPackedLSBF extends {
  override val name = "X-DFDL-ISO-88591-8-BIT-PACKED-LSB-FIRST"
  override val bitWidthOfACodeUnit = 8
  override val decodeString = (0 to 255).map { _.toChar }.mkString
  override val replacementCharCode = 0x5F
  override val requiredBitOrder = BitOrder.LeastSignificantBitFirst
} with BitsCharsetNonByteSize

/**
 * X-DFDL-ISO-88591-8-BIT-PACKED-MSB-FIRST occupies only 8 bits with each
 * code unit.
 */
object BitsCharsetISO885918BitPackedMSBF extends {
  override val name = "X-DFDL-ISO-88591-8-BIT-PACKED-MSB-FIRST"
  override val bitWidthOfACodeUnit = 8
  override val decodeString = (0 to 255).map { _.toChar }.mkString
  override val replacementCharCode = 0x5F
  override val requiredBitOrder = BitOrder.MostSignificantBitFirst
} with BitsCharsetNonByteSize
 {code}
The other two mentioned changes in "DaffodilCharsetProvider.scala" and 
"BitsCharsetNonByteSize.scala" were straight forward and I do not have 
questions regarding this changes.

Can you please review the file "ISO885918BitPacked.scale" because here I was 
not sure about the decodeString and replacementCharCode. Thanks for any 
feedback. As Alex mentioned as soon as I got feedback, we can test the changes 
with our data structure and if successful we will raise the PR. Thanks a lot in 
advance!!

Best regards, Kurt


was (Author: kuba72):
Hi Steve, Hi Mike,

The copy and adjustment of "ISO885918BitPacked.scale" file below (copy and 
adjusted from "USAASCII*BitPacked.scala").
{code:java}
/**
 * X-DFDL-ISO-88591-8-BIT-PACKED-LSB-FIRST occupies only 8 bits with each
 * code unit.
 */
object BitsCharsetISO885918BitPackedLSBF extends {
  override val name = "X-DFDL-ISO-88591-8-BIT-PACKED-LSB-FIRST"
  override val bitWidthOfACodeUnit = 8
  override val decodeString = (0 to 255).map { _.toChar }.mkString
  override val replacementCharCode = 0x5F
  override val requiredBitOrder = BitOrder.LeastSignificantBitFirst
} with BitsCharsetNonByteSize

/**
 * X-DFDL-ISO-88591-8-BIT-PACKED-MSB-FIRST occupies only 8 bits with each
 * code unit.
 */
object BitsCharsetISO885918BitPackedMSBF extends {
  override val name = "X-DFDL-ISO-88591-8-BIT-PACKED-MSB-FIRST"
  override val bitWidthOfACodeUnit = 8
  override val decodeString = (0 to 255).map { _.toChar }.mkString
  override val replacementCharCode = 0x5F
  override val requiredBitOrder = BitOrder.MostSignificantBitFirst
} with BitsCharsetNonByteSize
 {code}
The other two mentioned changes in "DaffodilCharsetProvider.scala" and 
"BitsCharsetNonByteSize.scala" were straight forward and I do not have 
questions regarding this changes.

Can you please review the file "ISO885918BitPacked.scale" because here I was 
not sure about the decodeString and replacementCharCode. Thanks for any 
feedback. As Alex mentioned as soon as I got feedback, we can test the changes 
with our data structure and if successful we will raise the PR. Thanks a lot in 
advance!!

Best regards, Kurt

> Too many bits in xs:string
> --------------------------
>
>                 Key: DAFFODIL-2293
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2293
>             Project: Daffodil
>          Issue Type: Question
>            Reporter: Alexander Deutschmann
>            Priority: Major
>
> Hello everyone,
> i have the following schema:
> {code:xml}
> <xs:complexType name="statusReportDetails">
>               <xs:sequence>
>                       <xs:element name="state" type="abc:stateenum" 
> dfdl:length="4" />
>                       <xs:element name="indicators" type="abc:indicators"  
> dfdl:length="16" />
>                       <xs:element name="v" type="v" dfdl:length="10" />
>                       <xs:element name="driverId" type="xs:string" 
> dfdl:lengthKind="explicit" dfdl:length="128" dfdl:alignment="8" />
>               </xs:sequence>
>       </xs:complexType>
> {code}
> And the related bitstream:
> {code:java}
> 0101 -> Enum
> 0000110000000001 -> indicators
> 0001100100 -> v
> 0000110001001100010011000100110001001100100011001000110010001100100011001100110011001100110011001100110100001101000011010000110100
>  -> driverId
> {code}
> The driverId has 130 bits and not the 128. bits which is defined in the 
> schema. 
> My question is where comes the first two bits ? I know it is an configuration 
> mistake or something like that.
> I hope someone can help me.
> Thank you.
> Alex



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to