> However, combining Jon Gorman's recommendation with some Googling, I get:
>
> my $outfile='4788022.edited.bib';
> open (my $output_marc, '>', $outfile) or die "Couldn't open file $!" ;
> binmode($output_marc, ':utf8');
>
> The open statement may not be quite correct, as I am not familiar with t
> You can set the correct encoding succinctly on opening files
> e.g. open my $fh, '>:encoding(UTF-8)', $outfile
You might also see this even more succinct variant:
open my $fh, '>:utf8', $outfile
though technically speaking, that will not give you guaranteed conformant UTF-8
because it could
rl4lib@perl.org
Subject: RE: Opening & writing to UTF-8 files; copyright symbol again --
solution
Hey, that’s my post! Anyways, I haven’t really looked into what your problem
is, but when you said that the copyright character is getting transformed to A9
even though it is supposedly stored a
On Fri, Nov 13, 2015 at 10:05:01PM +, Highsmith, Anne L wrote:
> I should probably say, "apparent solution" 'cause character set issues never
> seem to end.
>
> However, combining Jon Gorman's recommendation with some Googling, I get:
>
> my $outfile='4788022.edited.bib';
> open (my $output_
...@library.tamu.edu]
Sent: Friday, November 13, 2015 2:05 PM
To: perl4lib@perl.org
Subject: Opening & writing to UTF-8 files; copyright symbol again -- solution
I should probably say, “apparent solution” ‘cause character set issues never
seem to end.
However, combining Jon Gorman’s recommendation with
I should probably say, "apparent solution" 'cause character set issues never
seem to end.
However, combining Jon Gorman's recommendation with some Googling, I get:
my $outfile='4788022.edited.bib';
open (my $output_marc, '>', $outfile) or die "Couldn't open file $!" ;
binmode($output_marc, ':utf
Ack, sorry, various copying and pasting apparently caused Google Mail to
have issues.
As I as was saying,before I must have hit some keystroke that I'm sure
makes sense in whatever editor I was just susing:
Instead of having:
open(OUTPUT, ">$outfile");
... (whole bunch o code)
print OUTPUT
I'll ask the easiest solution first ;).
Are you sure the file 4788022.bib is in unicode and not marc-8? If it is in
unicode, is the leader 09 byte set to a?
I'm a bit rusty on the as_usmarc() call as well, you might want to check
the docs to make sure that doesn't do something like convert it to
This is related to my previous post (9/17/2015) about deleting 035 fields after
RDA-ification. Jon Gorman solved that one for me by pointing out that I
probably had a problem with my perl libraries.
But now, instead of creating the record from the database and writing it back
to the database, I