|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 days ago @ 9:20 AM
Posts: 3,396,
Visits: 26,180
|
Jean-Marie WAECHTER (1/27/2007)
When using report generator, character set is Unicode, which is most of time not correctly recognized by external genealogy software (but unions are correctly handled), is it possible to have a the gedcom report generator with a skin in ANSEL ?? UTF-8 encoding is part of the Gedcom 5.5.1 draft standard and supported by several packages including PAF and Legacy Family Tree. You could always import your Gedcom to one of these and re-export as ANSEL. However, conversion of Unicode to ANSEL appears to me to be extremely complex, and not something I would like to tackle. So I will bat this question on to Dan - GenoPro has a Unicode to ANSEL routine used in the built-in export to Gedcom, could this be made available in the Report Generator SDK? The SDK already has a method: Method | Description | BufferWriteToFile(fileName, [encoding]) | Writes the content of the buffer to a file with an optional encoding. | But [encoding] is not documented and setting this parameter to 'ANSEL' produces an error.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Thursday, January 16, 2025
Posts: 4,887,
Visits: 22,775
|
Ron (1/27/2007)
According to http://www.w3.org/International/questions/qa-controls#further all control codes in the range 0x00 - 0x1f are invalid in XML 1.0 except for 0x09 (Tab) , 0x0A (Linefeed) & 0x0D (Carriage Return). I suggest GenoPro converts invalid XML characters to U+00BF, the inverted question mark. ¿ and writes a warning to the message log on import. They can only be encoded under XML 1.1 The XML encoding module was not designed to report errors/warning to the user, as encoding of text should not produce any error. Perhaps GenoPro change the header to XML version 1.1. Ron (1/27/2007)
However, conversion of Unicode to ANSEL appears to me to be extremely complex, and not something I would like to tackle. So I will bat this question on to Dan - GenoPro has a Unicode to ANSEL routine used in the built-in export to Gedcom, could this be made available in the Report Generator SDK? The SDK already has a method: Method | Description | BufferWriteToFile(fileName, [encoding]) | Writes the content of the buffer to a file with an optional encoding. |
But [encoding] is not documented and setting this parameter to 'ANSEL' produces an error. I have never been able to find a table to convert ANSEL to Unicode (or vice versa). The ANSEL encoding is one of the most cryptic encoding I have ever seen; it has no logic, no documentation, and no sample files. What I did was installing other genealogy software, typed some text with accents and looked how those characters were encoded in the .ged file. Worse of all, the ANSEL encoding is an extra [useless] layer on top of the current code page. As a result, you may have English-ANSEL encoding, Russian-ANSEL encoding, Hebrew-ANSEL encoding, and so on. When GenoPro imports a Gedcom file, it performs two decoding, one from the current language from the control panel and then the ANSEL decoding. There are tons of bugs regarding ANSEL encoding because there is no clear specifications. I would stay away from ANSEL encoding as much as possible. The method BufferWriteToFile has indeed a parameter for encoding. At the moment, the only valid value is GZip, however all the other encoding can be accepted. I looked at the code and the code was explicitly commented out because this feature has not been tested to my satisfaction. During the next beta phase, I will re-enable the code to support various encoding. In the meantime, use UTF-8 encoding.
Edited: Saturday, January 27, 2007 by
GenoProSupport
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 days ago @ 9:20 AM
Posts: 3,396,
Visits: 26,180
|
GenoProSupport (1/27/2007) The XML encoding module was not designed to report errors/warning to the user, as encoding of text should not produce any error. Perhaps GenoPro change the header to XML version 1.1. Support for XML 1.1 appears to be a little sparse and is not supported by any version of the MS Parser, therefore changing the header to 1.1 would not be helpful as errors would still occur. But I still think GenoPro should produce valid XML 1.0 so I would be happy if it silently converted invaid codes to some other character. I realise the inverted question mark is used in Spanish so might be a little confusing. Perhaps the currency sign ¤ would be a better choice as a widely available character that is not used much.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Edited: Sunday, January 28, 2007 by
GenoProSupport
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Thursday, January 16, 2025
Posts: 4,887,
Visits: 22,775
|
I don't want GenoPro to perform any character substitution. My intuition is this will give me trouble in the future. I think it is already the case, since XML 1.1 is considering supporting those characters. Clearly, I don't understand why those XML readers cannot support entities such as  or  while it can support entities such as 	 and .If GenoPro converts some characters to ¤ , then how GenoPro will read back those original characters? Displaying ¤ for an unknown character is a good idea, however storing ¤ in XML will result in data loss. I want XML to be round-tripping, that is writing, reading and writing back to give the same result. The other question is: how those illegal characters got there? The entity/character  which is the EM (U+0019) should probably be converted to a dash during the Gedcom import, not in the XML export.
Edited: Sunday, January 28, 2007 by
GenoProSupport
|
|
|
Gamma Moderators Administrators FamilyTrees.GenoPro.com Customers GenoPro version: 3.1.0.0
Last Login: Wednesday, October 7, 2020
Posts: 952,
Visits: 10,075
|
GenoProSupport (1/28/2007) The entity/character  which is the EM (U+0019) should probably be converted to a dash during the Gedcom import, not in the XML export.I agree that the illegal character conversion should happen during at the Gedcom import.
Edited: Sunday, January 28, 2007 by
GenoProSupport
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 days ago @ 9:20 AM
Posts: 3,396,
Visits: 26,180
|
JcMorin (1/28/2007)
GenoProSupport (1/28/2007) The entity/character  which is the EM (U+0019) should probably be converted to a dash during the Gedcom import, not in the XML export.I agree that the illegal character conversion should happen during at the Gedcom import.
Me too. It doesn't matter to me how we get there, the result is the same - valid XML 1.0 GenoPro data is visible externally as XML, so whether the conversion is on input or output is immaterial.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Edited: Thursday, February 1, 2007 by
GenoProSupport
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Thursday, January 16, 2025
Posts: 4,887,
Visits: 22,775
|
For those having this problem, here is a solution: 1. Rename the .gno file to .zip. 2. Double-click on the .zip file and extract the file Data.xml. 3. Double-click on the file Data.xml. Internet Explorer will display the errors. 4. Using Notepad, remove the errors, that is all  5. Open the file Data.xml using GenoPro. 6. Voilà. Fixing the Gedcom import module will prevent further errors, however if you are getting errors generating a report, it is too late because the data is already in your .gno file. The trick then is fixing the .gno file.
Edited: Thursday, February 1, 2007 by
GenoProSupport
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: Thursday, January 16, 2025
Posts: 4,887,
Visits: 22,775
|
|