3

How to change text encoded in ANSEL to UTF-8 in C#?

Tom Smykowski
  • 25,487
  • 54
  • 159
  • 236

3 Answers3

3

This is a non-trivial conversion as Windows/.NET Framework does not have an ANSEL codepage. See here for the travails of another person attempting this conversion.

joshperry
  • 41,167
  • 16
  • 88
  • 103
1

There is an AnselEncoding class (deriving from the standard Encoding class) available as part of Gedcom.NET at http://sourceforge.net/projects/gedcom-net/ that also includes support for some of the LDS extensions.

David Knight
  • 763
  • 6
  • 12
1

Joshperry is correct. Eichmann's site has basically the ONLY documentation around that attempts to explain ANSEL encoding. Unfortunately there is no program code there, so you'll have to code it yourself.

There is another code table (dated Dec 2007 - I didn't know anyone was still interested) for ANSEL at: http://lcweb2.loc.gov/diglib/codetables/45.html which is worthwhile comparing Eichmann's work to, since he did admit there were a few codes he's unsure of.

If you are interested from a genealogy point of view, the GEDCOM standard release 5.5 has an abbreviated ANSEL character set and some encodings in its Appendix D.


Update Sept 2017: Long after my original answer of this question, Tamura Jones wrote an excellent series of articles about ANSEL that are worth checking out:

lkessler
  • 19,819
  • 36
  • 132
  • 203
  • Have a look at Gramps ANSEL to Unicode Conversion code https://github.com/gramps-project/gramps/blob/c5f2717623d4fa301c16014dac29c281cf3baf3e/gramps/plugins/lib/libgedcom.py#L1171 – Sam Sep 14 '17 at 22:15