Re: Gedcom files encoding

[email protected] (Ron Savage) Thu, 06 Sep 2012 08:25:41 +1000
Newsgroups perl.gedcom
Message-ID <[email protected]>
Hi Jose

On 05/09/12 22:07, Jose Joao Dias de Almeida wrote:
> Dear Gedcom-ers,
> I just star with Gedcom.pm and things are beginning to work!
>
> But I have problems with files in Unicode.
>
> When files are in utf8 + BOM --> it returns error in first line (the BOM)
>
> If I remove the BOM and try again, apparently it does not pay attention
> to "1 CHAR UTF-8"
>
> Is there any extra thing to say in this cases?
> Um abraço
> J.Joao
>
> 0 HEAD
> 1 GEDC
> 2 VERS 5.5
> 2 FORM LINEAGE-LINKED
> 1 CHAR UTF-8
> 1 LANG Portuguese
> 1 SOUR MYHERITAGE
> ...

I just checked the source code of Gedcom.pm V 1.16, and the only 
reference to utf8 is on line 390, where it is writing an XML file.

So, you're right, of course.

What do you think should happen?

Perhaps if the code detects 1 CHAR UTF-8 the input file should be closed 
and re-opened in utf-8 mode, yes?


-- 
Ron Savage
http://savage.net.au/
Ph: 0421 920 622