> On Mar 1, 2024, at 10:45 AM, Andrew Hankinson <
andrew.h...@gmail.com> wrote:
>
> I think the problem, as I understood it, is that the dollar sign can't actually appear in the field values... So you can't have "$aThis Book Costs $1.99" since most MARC parsers will interpret that as the start of a $1 field.
>
> (Like I said, we have the same problem so I'm familiar with it...)
But pymarc doesn’t enforce that, right?
```
from pymarc import Record, Field, Subfield, MARCReader
rec = Record()
rec.add_field(Field(
tag="245",
indicators=["0", "1"],
subfields=[
Subfield(code="a", value="Huckleberry $Finn")
]
))
open('rec.dat', 'wb').write(rec.as_marc())
rec = next(MARCReader(open('rec.dat', 'rb')))
print(rec['245']['a’])
```
It seems like it might be possible to customize pymarc for a particular downstream parsing library?
//Ed