Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Gedcom Invalied coding

0 votes

Hi,

 

I have a GEDCOM file, which I want to import in yED, but the error is:

java.io.IOException: GEDCOM - invalid encoding: The encoding of the file should be UTF-8, UTF-16BE, UTF-16LE, ANSEL, ASCII, or ANSI.
at D.B.A.A.D.ă(Unknown Source)
at D.B.A.A.D.ā(Unknown Source)
at D.B.A.A.B.ā(Unknown Source)
at y.H.G.ā(Unknown Source)
at y.B.A.M.ď(Unknown Source)
at B.A.A.B.G.H.ď(Unknown Source)
at y.B.W.Č(Unknown Source)
at y.B.W.ā(Unknown Source)
at y.B.W.ă(Unknown Source)
at B.A.A.B.Q.Ă(Unknown Source)
at B.A.A.B.Q.ā(Unknown Source)
at B.A.A.J.A.ā(Unknown Source)
at B.A.A.J.A.ā(Unknown Source)
at B.A.A.J.D.ă(Unknown Source)
at B.A.A.J.D.Ă(Unknown Source)
at B.A.A.B$5.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
 
I looked at the file, but it seems to be compliant with GEDCOM standards. I hope you can help me.
 
Thank you.
Jeroen
in Help by
recategorized by

1 Answer

0 votes

Hi Jeroen,

GEDCOM supports different file encodings. Applications that read GEDCOM files need to be able to detect the encoding used when creating the file.

For yEd to be able to do that, a GEDCOM file either needs byte order marks for UTF-8, UTF-16BE, or UTF-16LE encodings or an explicit encoding declaration for ANSEL, ANSI, ASCII, UTF-8, UTF-16BE, or UTF-16LE encodings.

Your file has neither. The simplest fix is to introduce an explicit encoding declaration. To do that, add 1 CHAR [ENCODINGNAME] as the second line of your file, with [ENCODINGNAME] being one of the aforementioned supported encodings. Which encoding to choose actually depends on the way you generate the file. E.g. if you create the file in a text editor on a Windows machine, ANSI is appropriate. On a Linux machine, UTF-8 would be the way to go.

 

Aside from that, there is actually a second problem with your file: The first line in your file

0 HEAD

has a trailing space character. That is not allowed in GEDCOM. You need to remove that space character for yEd to accept your file.

by [yWorks] (161k points)
Hello Thomas,

thank you for your reply. I followed your instructions, but I still get the error message.

These are the changes I made:
- Removed the trailing space from the first line "0 HEAD "
- added on the second line the following code "1 CHAR [ANSI]

I choose ANSI as I am working on a windows machine.
It seems that I cant upload my new file, but maybe you can help me.

Thanks

Jeroen


==============
UPDATE: Turns out I needed to remove the []. sometimes t is really simple:-)

Thanks. wors fine now.
Legal Disclosure | Privacy Policy
...